[Python-checkins] gh-89038: [doc] update dis.findlinestarts documentation for changes related to PEP-626 (GH-94247)

iritkatriel webhook-mailer at python.org
Thu Jun 30 10:57:47 EDT 2022


https://github.com/python/cpython/commit/d68f2d27bbf85f3573a08fc7554889e1733a30f0
commit: d68f2d27bbf85f3573a08fc7554889e1733a30f0
branch: main
author: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2022-06-30T15:57:35+01:00
summary:

gh-89038: [doc] update dis.findlinestarts documentation for changes related to PEP-626 (GH-94247)

files:
M Doc/library/dis.rst

diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 4ec2fb0de98fb..d2c3c1a0966d7 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -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)
 



More information about the Python-checkins mailing list