Skip to content

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

Open
tangyuan0821 wants to merge 1 commit intopython:mainfrom
tangyuan0821:114212
Open

gh-114212:Note 3.13 stack order change for LOAD_GLOBAL/LOAD_ATTR/LOAD_SUPER_ATTR#137909
tangyuan0821 wants to merge 1 commit intopython:mainfrom
tangyuan0821:114212

Conversation

@tangyuan0821
Copy link
Copy Markdown
Contributor

@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