-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
bytearray.extend: Misleading error message #115323
Labels
type-bug
An unexpected behavior, bug, or error
Comments
Behavior same back to 3.11. The currently message is erroneous enough that backporting should be considered. |
terryjreedy
added a commit
that referenced
this issue
Feb 24, 2024
…th str (#115332) Perform str check after TypeError is raised --------- Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Feb 24, 2024
…end with str (pythonGH-115332) Perform str check after TypeError is raised --------- (cherry picked from commit 948acd6) Co-authored-by: Jay Ting <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Feb 24, 2024
…end with str (pythonGH-115332) Perform str check after TypeError is raised --------- (cherry picked from commit 948acd6) Co-authored-by: Jay Ting <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
After adding the backport tags and having them start, I changed my mind and closed them. |
woodruffw
pushed a commit
to woodruffw-forks/cpython
that referenced
this issue
Mar 4, 2024
…end with str (python#115332) Perform str check after TypeError is raised --------- Co-authored-by: Terry Jan Reedy <[email protected]>
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
…end with str (python#115332) Perform str check after TypeError is raised --------- Co-authored-by: Terry Jan Reedy <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description:
… except that
bytes.extend
doesn't even accept integers as arguments; the error refers to the first element of the string, which happens also to be a string in Python. Meh.Could CPython please complain about requiring the string to be encoded instead?
CPython versions tested on:
main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: