From 54fcd4fbfa5f0d6966814283eb601cf842f98242 Mon Sep 17 00:00:00 2001 From: Jan-Eric Nitschke Date: Mon, 8 Sep 2025 08:27:48 +0200 Subject: [PATCH] Update documentation for LOAD_ATTR and LOAD_GLOBAL --- Doc/library/dis.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 7360f4aa804724..7a511cf5e29a90 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1259,13 +1259,17 @@ iterations of the loop. correct name, the bytecode pushes the unbound method and ``STACK[-1]``. ``STACK[-1]`` will be used as the first argument (``self``) by :opcode:`CALL` or :opcode:`CALL_KW` when calling the unbound method. - Otherwise, ``NULL`` and the object returned by - the attribute lookup are pushed. + Otherwise, the object returned by the attribute lookup + and ``NULL`` are pushed. .. versionchanged:: 3.12 If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is pushed to the stack before the attribute or unbound method respectively. + .. versionchanged:: 3.13 + ``NULL`` or ``self`` is now pushed to the stack after the attribute + or unbound method respectively. + .. opcode:: LOAD_SUPER_ATTR (namei) @@ -1422,6 +1426,9 @@ iterations of the loop. If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack before the global variable. + .. versionchanged:: 3.13 + ``NULL`` is now pushed to the stack after the global variable. + .. opcode:: LOAD_FAST (var_num) Pushes a reference to the local ``co_varnames[var_num]`` onto the stack.