Skip to content

Commit d25324a

Browse files
Update the *_DEREF docs.
1 parent e4bf977 commit d25324a

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

Doc/library/dis.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,9 +1071,13 @@ All of the following opcodes use their arguments.
10711071

10721072
.. opcode:: LOAD_DEREF (i)
10731073

1074-
Loads the cell contained in slot *i* of the cell and free variable storage.
1074+
Loads the cell contained in slot ``i - len(co_varnames)`` of the cell
1075+
and free variable storage.
10751076
Pushes a reference to the object the cell contains on the stack.
10761077

1078+
.. versionchanged:: 3.10
1079+
``i`` is offset by the length of ``co_varnames``.
1080+
10771081

10781082
.. opcode:: LOAD_CLASSDEREF (i)
10791083

@@ -1083,20 +1087,30 @@ All of the following opcodes use their arguments.
10831087

10841088
.. versionadded:: 3.4
10851089

1090+
.. versionchanged:: 3.10
1091+
``i`` is offset by the length of ``co_varnames``.
1092+
10861093

10871094
.. opcode:: STORE_DEREF (i)
10881095

1089-
Stores TOS into the cell contained in slot *i* of the cell and free variable
1090-
storage.
1096+
Stores TOS into the cell contained in slot ``i - len(co_varnames)``
1097+
of the cell and free variable storage.
1098+
1099+
.. versionchanged:: 3.10
1100+
``i`` is offset by the length of ``co_varnames``.
10911101

10921102

10931103
.. opcode:: DELETE_DEREF (i)
10941104

1095-
Empties the cell contained in slot *i* of the cell and free variable storage.
1105+
Empties the cell contained in slot ``i - len(co_varnames)``
1106+
of the cell and free variable storage.
10961107
Used by the :keyword:`del` statement.
10971108

10981109
.. versionadded:: 3.2
10991110

1111+
.. versionchanged:: 3.10
1112+
``i`` is offset by the length of ``co_varnames``.
1113+
11001114

11011115
.. opcode:: RAISE_VARARGS (argc)
11021116

0 commit comments

Comments
 (0)