Skip to content

Commit ecc8e77

Browse files
authored
[3.11] gh-89038: [doc] update dis.findlinestarts documentation for changes related to PEP-626 (GH-94247) (GH-94450)
(cherry picked from commit d68f2d2) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
1 parent f58c366 commit ecc8e77

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Doc/library/dis.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,17 @@ operation is being performed, so the intermediate analysis object isn't useful:
268268

269269
.. function:: findlinestarts(code)
270270

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
273273
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.
276274

277275
.. versionchanged:: 3.6
278276
Line numbers can be decreasing. Before, they were always increasing.
279277

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+
280282

281283
.. function:: findlabels(code)
282284

0 commit comments

Comments
 (0)