@@ -20,6 +20,10 @@ interpreter.
20
20
between versions of Python. Use of this module should not be considered to
21
21
work across Python VMs or Python releases.
22
22
23
+ .. versionchanged :: 3.6
24
+ Use 2 bytes for each instruction. Previously the number of bytes varied
25
+ by instruction.
26
+
23
27
24
28
Example: Given the function :func: `myfunc `::
25
29
@@ -210,6 +214,11 @@ operation is being performed, so the intermediate analysis object isn't useful:
210
214
This generator function uses the ``co_firstlineno `` and ``co_lnotab ``
211
215
attributes of the code object *code * to find the offsets which are starts of
212
216
lines in the source code. They are generated as ``(offset, lineno) `` pairs.
217
+ See :source: `Objects/lnotab_notes.txt ` for the ``co_lnotab `` format and
218
+ how to decode it.
219
+
220
+ .. versionchanged :: 3.6
221
+ Line numbers can be decreasing. Before, they were always increasing.
213
222
214
223
215
224
.. function :: findlabels(code)
@@ -1127,8 +1136,13 @@ All of the following opcodes use their arguments.
1127
1136
.. opcode :: HAVE_ARGUMENT
1128
1137
1129
1138
This is not really an opcode. It identifies the dividing line between
1130
- opcodes which don't take arguments ``< HAVE_ARGUMENT `` and those which do
1131
- ``>= HAVE_ARGUMENT ``.
1139
+ opcodes which don't use their argument and those that do
1140
+ (``< HAVE_ARGUMENT `` and ``>= HAVE_ARGUMENT ``, respectively).
1141
+
1142
+ .. versionchanged :: 3.6
1143
+ Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT ``
1144
+ ignore it. Before, only opcodes ``>= HAVE_ARGUMENT `` had an argument.
1145
+
1132
1146
1133
1147
.. _opcode_collections :
1134
1148
0 commit comments