Skip to content

Commit 22c7ae9

Browse files
Update code.rst
1 parent 7739eef commit 22c7ae9

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎Doc/c-api/code.rst‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,12 @@ bound into a function.
9595
.. c:function:: int PyCode_Addr2Line(PyCodeObject *co, int byte_offset)
9696
9797
Return the line number of the instruction that occurs on or before
98-
``byte_offset`` and ends after it. This is ``O(N)`` in the number of
98+
``byte_offset`` and ends after it. This may be ``O(N)`` in the number of
9999
instructions in the code object, so it is not performant for iterating over
100100
all the line numbers in a code object.
101101
102102
If you just need the line number of a frame, use :c:func:`PyFrame_GetLineNumber` instead.
103103
104-
For efficiently iterating over the line numbers in a code object, use :pep:`the API described in PEP 626
105-
<0626#out-of-process-debuggers-and-profilers>`.
106-
107104
.. c:function:: int PyCode_Addr2Location(PyObject *co, int byte_offset, int *start_line, int *start_column, int *end_line, int *end_column)
108105
109106
Sets the passed ``int`` pointers to the source code line and column numbers

0 commit comments

Comments
 (0)