You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s = "abc"
c = s.count('b', 0, 0) # x.py:2:4: error: Too many arguments for "count" of "str"
The code is valid; the error is spurious. As discussed in PR #1107, it appears that fixing this is a bit complex due to the type definition of Sequence.count.
The text was updated successfully, but these errors were encountered:
@gvanrossum@JelleZijlstra I think I made a mistake in my earlier exploration of the problem. Simply changing the annotation of str.count appears to work, contrary to what I said earlier. Working on a new PR now.
The code is valid; the error is spurious. As discussed in PR #1107, it appears that fixing this is a bit complex due to the type definition of Sequence.count.
The text was updated successfully, but these errors were encountered: