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
Improve error reporting for the argument parsing C API #47604
Comments
When you sort a list with list.sort() or sorted(list), and set the
I would expect a more proper error message for the reverse parameter, |
Well, booleans technically are integers. |
The problem is not only that the error message "TypeError: an integer is |
Patches are welcome. |
The unspecific error message is thrown by the vgetargskeywords() |
I think this is closer to a language wide change and should probably be For Py2.6, I think things are fine as it stands. This isn't a bug |
Agree. Seems to be a more general weakness of the argument parsing of |
See also bpo-18269. |
Reproduced in 3.11: >>> sorted([1,2,3], reverse=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object cannot be interpreted as an integer |
Note: 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: