-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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-91153: Handle mutating __index__
methods in bytearray
item assignment
#94891
GH-91153: Handle mutating __index__
methods in bytearray
item assignment
#94891
Conversation
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.
Thanks!
The change in semantics seems fine; I don't think we provide guarantees on when dunders like __index__
are called.
Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
Sorry @brandtbucher, I had trouble checking out the |
…ssignment (pythonGH-94891) (cherry picked from commit f365895) Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
GH-95013 is a backport of this pull request to the 3.10 branch. |
Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-95014 is a backport of this pull request to the 3.11 branch. |
…ssignment (pythonGH-94891) (cherry picked from commit f365895) Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
This creates a (very slight) change in semantics. Previously, an assignment to an invalid index would raise without calling
__index__
. Now, it calls__index__
and then raises. I really doubt it's an issue in practice, though.Also, add some missing nearby braces.