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