File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -268,15 +268,17 @@ operation is being performed, so the intermediate analysis object isn't useful:
268
268
269
269
.. function :: findlinestarts(code)
270
270
271
- This generator function uses the ``co_firstlineno `` and `` co_lnotab ``
272
- attributes of the code object *code * to find the offsets which are starts of
271
+ This generator function uses the ``co_lines `` method
272
+ of the code object *code * to find the offsets which are starts of
273
273
lines in the source code. They are generated as ``(offset, lineno) `` pairs.
274
- See :source: `Objects/lnotab_notes.txt ` for the ``co_lnotab `` format and
275
- how to decode it.
276
274
277
275
.. versionchanged :: 3.6
278
276
Line numbers can be decreasing. Before, they were always increasing.
279
277
278
+ .. versionchanged :: 3.10
279
+ The :pep: `626 ` ``co_lines `` method is used instead of the ``co_firstlineno ``
280
+ and ``co_lnotab `` attributes of the code object.
281
+
280
282
281
283
.. function :: findlabels(code)
282
284
You can’t perform that action at this time.
0 commit comments