-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-107427: Update the description of UNPACK_SEQUENCE #107429
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
Conversation
Doc/library/dis.rst
Outdated
STACK.extend(STACK.pop()[:count:-1]) | ||
STACK.extend(STACK.pop()[:-count-1:-1]) |
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.
Shouldn't we also document somehow that we require STACK.pop()
to have exactly count
elements?
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.
Update the sentence Unpacks ``STACK[-1]`` into *count* individual values
into Unpacks ``STACK.pop()`` into *count* individual values
will be enough?
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 don’t think so. Leave that sentence alone, but add e.g. “Require there to be exactly count
values.”
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.
Done!
Doc/library/dis.rst
Outdated
STACK.extend(STACK.pop()[:count:-1]) | ||
STACK.extend(STACK.pop()[:-count-1:-1]) |
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 don’t think so. Leave that sentence alone, but add e.g. “Require there to be exactly count
values.”
Technically the thing on top of the stack may not have a |
Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
GH-107459 is a backport of this pull request to the 3.12 branch. |
📚 Documentation preview 📚: https://cpython-previews--107429.org.readthedocs.build/