@@ -1071,9 +1071,13 @@ All of the following opcodes use their arguments.
1071
1071
1072
1072
.. opcode :: LOAD_DEREF (i)
1073
1073
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.
1075
1076
Pushes a reference to the object the cell contains on the stack.
1076
1077
1078
+ .. versionchanged :: 3.10
1079
+ ``i `` is offset by the length of ``co_varnames ``.
1080
+
1077
1081
1078
1082
.. opcode :: LOAD_CLASSDEREF (i)
1079
1083
@@ -1083,20 +1087,30 @@ All of the following opcodes use their arguments.
1083
1087
1084
1088
.. versionadded :: 3.4
1085
1089
1090
+ .. versionchanged :: 3.10
1091
+ ``i `` is offset by the length of ``co_varnames ``.
1092
+
1086
1093
1087
1094
.. opcode :: STORE_DEREF (i)
1088
1095
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 ``.
1091
1101
1092
1102
1093
1103
.. opcode :: DELETE_DEREF (i)
1094
1104
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.
1096
1107
Used by the :keyword: `del ` statement.
1097
1108
1098
1109
.. versionadded :: 3.2
1099
1110
1111
+ .. versionchanged :: 3.10
1112
+ ``i `` is offset by the length of ``co_varnames ``.
1113
+
1100
1114
1101
1115
.. opcode :: RAISE_VARARGS (argc)
1102
1116
0 commit comments