-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-117557: Improve error messages when a string, bytes or bytearray of length 1 are expected #117631
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
gh-117557: Improve error messages when a string, bytes or bytearray of length 1 are expected #117631
Conversation
…rray of length 1 are expected
15ff9a3
to
308f7a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice; thanks, Serhiy!
I left some comments.
Right, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
I am not sure about articles. It is a puzzle to me whether they should be used, and whether not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these suggestions are correct, but I'd like them to be verified by a native speaker.
Co-authored-by: Erlend E. Aasland <[email protected]>
@terryjreedy, could you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the tests non-clinic python code carefully and tried the check the logic of the rest. It seems that there are more error cases that error tests, so I wonder if all were covered in a test.
Over all I really like the patch.
When you're done making the requested changes, leave the comment: |
I have made the requested changes; please review again. Although I am not sure that I have made them all. There is a variety in wording, and some examples look contradictory. "a unicode character", "str of length 1", "string of length 1" -- refers to str of length 1. |
Thanks for making the requested changes! @erlend-aasland, @terryjreedy: please review the changes made to this pull request. |
@terryjreedy, could you please take another look? |
…rray of length 1 are expected (pythonGH-117631)
Uh oh!
There was an error while loading. Please reload this page.