Skip to content

Commit 54fcd4f

Browse files
Update documentation for LOAD_ATTR and LOAD_GLOBAL
1 parent b0420b5 commit 54fcd4f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Doc/library/dis.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,13 +1259,17 @@ iterations of the loop.
12591259
correct name, the bytecode pushes the unbound method and ``STACK[-1]``.
12601260
``STACK[-1]`` will be used as the first argument (``self``) by :opcode:`CALL`
12611261
or :opcode:`CALL_KW` when calling the unbound method.
1262-
Otherwise, ``NULL`` and the object returned by
1263-
the attribute lookup are pushed.
1262+
Otherwise, the object returned by the attribute lookup
1263+
and ``NULL`` are pushed.
12641264

12651265
.. versionchanged:: 3.12
12661266
If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is
12671267
pushed to the stack before the attribute or unbound method respectively.
12681268

1269+
.. versionchanged:: 3.13
1270+
``NULL`` or ``self`` is now pushed to the stack after the attribute
1271+
or unbound method respectively.
1272+
12691273

12701274
.. opcode:: LOAD_SUPER_ATTR (namei)
12711275

@@ -1422,6 +1426,9 @@ iterations of the loop.
14221426
If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the
14231427
stack before the global variable.
14241428

1429+
.. versionchanged:: 3.13
1430+
``NULL`` is now pushed to the stack after the global variable.
1431+
14251432
.. opcode:: LOAD_FAST (var_num)
14261433

14271434
Pushes a reference to the local ``co_varnames[var_num]`` onto the stack.

0 commit comments

Comments
 (0)