New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the implementation consistency of operator.countOf/indexOf #88724
Comments
operator.countOf behaves differently in its docstring and its c and python implementations when help(countOf) -> countOf(a, b, /)
Return the number of times b occurs in a. This could be read to say that it returns equal to Its python implementation returns Since its c implementation uses Results of these implementations can differ when The issue is demonstrated with a possible fix here https://godbolt.org/z/cPT7TToG7 Since the c version has been in the wild for decades, I suggest that it should be taken to define the function; I will open a pull request with these changes shortly. |
This issue can be closed, no? |
is
/ ==
inconsistency
Thank you Rupert for reporting and contributing!! |
is
/==
treatment to c #27007is
/==
treatment to c (GH-27007) #27053is
/==
treatment to c (GH-27007). #27055Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: