]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-89038: [doc] update dis.findlinestarts documentation for changes related to PEP...
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Thu, 30 Jun 2022 14:57:35 +0000 (15:57 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Jun 2022 14:57:35 +0000 (15:57 +0100)
Doc/library/dis.rst

index 4ec2fb0de98fb7f6dbc326844a8c9b476fce22fb..d2c3c1a0966d71aa8c335ea4a604edcecf926199 100644 (file)
@@ -266,15 +266,17 @@ operation is being performed, so the intermediate analysis object isn't useful:
 
 .. function:: findlinestarts(code)
 
-   This generator function uses the ``co_firstlineno`` and ``co_lnotab``
-   attributes of the code object *code* to find the offsets which are starts of
+   This generator function uses the ``co_lines`` method
+   of the code object *code* to find the offsets which are starts of
    lines in the source code.  They are generated as ``(offset, lineno)`` pairs.
-   See :source:`Objects/lnotab_notes.txt` for the ``co_lnotab`` format and
-   how to decode it.
 
    .. versionchanged:: 3.6
       Line numbers can be decreasing. Before, they were always increasing.
 
+   .. versionchanged:: 3.10
+      The :pep:`626` ``co_lines`` method is used instead of the ``co_firstlineno``
+      and ``co_lnotab`` attributes of the code object.
+
 
 .. function:: findlabels(code)