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:
266266
267267.. function :: findlinestarts(code)
268268
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
271271 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.
274272
275273 .. versionchanged :: 3.6
276274 Line numbers can be decreasing. Before, they were always increasing.
277275
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+
278280
279281.. function :: findlabels(code)
280282
You can’t perform that action at this time.
0 commit comments