Skip to content

gh-114212:Note 3.13 stack order change for LOAD_GLOBAL/LOAD_ATTR/LOAD_SUPER_ATTR #137909

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tangyuan0821
Copy link

@tangyuan0821 tangyuan0821 commented Aug 18, 2025

Summary

Document the Python 3.13 change in the stack push order for LOAD_GLOBAL, LOAD_ATTR, and LOAD_SUPER_ATTR so that the callable stays at a fixed position for CALL/CALL_KW.

Changes

  • dis.rst:
  1. Add versionchanged:: 3.13 for the three opcodes.
  2. Clarify that the value (global/attribute/method) is pushed before NULL/self.
  3. Keep 3.11/3.12 notes accurate by using past tense to avoid conflict with 3.13.

📚 Documentation preview 📚: https://cpython-previews--137909.org.readthedocs.build/

…LOAD_SUPER_ATTR (pythongh-114212)

Body: In Python 3.13, to keep the callable at a fixed stack position for CALL/CALL_KW, the push order changed: the attribute/global/method is now pushed before the NULL/self marker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant