https://github.com/python/cpython/commit/f7a7b4b0fef571c400559ace0adf266699c8bca9 commit: f7a7b4b0fef571c400559ace0adf266699c8bca9 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: StanFromIreland <[email protected]> date: 2026-10-22T21:17:38Z summary:
[3.14] gh-126970: Correct `LOAD_GLOBAL` stack order documentation (GH-159851) (#160348) (cherry picked from commit 79a9ca07ad92a27301c2fb675150cd78fea62224) Co-authored-by: limadog9 <[email protected]> files: M Doc/library/dis.rst diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 137d516f22cfef..240a921e8de254 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1433,10 +1433,14 @@ iterations of the loop. .. opcode:: LOAD_GLOBAL (namei) Loads the global named ``co_names[namei>>1]`` onto the stack. + If the low bit of ``namei`` is set, a ``NULL`` is pushed onto the stack + after the global variable. .. versionchanged:: 3.11 - If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the - stack before the global variable. + The low bit of ``namei`` indicates whether a ``NULL`` is pushed. + + .. versionchanged:: 3.13 + The ``NULL`` is pushed after the global variable, rather than before it. .. opcode:: LOAD_FAST (var_num) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
