Skip to content

Commit b7af977

Browse files
committed
3.11 Whatsnew: Combine error locations sections to avoid duplication
1 parent 3dfe32b commit b7af977

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

Doc/c-api/code.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. highlight:: c
22

3-
.. _codeobjects:
4-
53
.. index:: object; code, code object
64

5+
.. _codeobjects:
6+
77
Code Objects
88
------------
99

Doc/whatsnew/3.11.rst

+8-16
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ As well as complex arithmetic expressions:
131131
~~~~~~^~~
132132
ZeroDivisionError: division by zero
133133
134+
Additionally, the information used by the enhanced traceback feature
135+
is made available via a general API, that can be used to correlate
136+
:term:`bytecode` :ref:`instructions <bytecodes>` with source code location.
137+
This information can be retrieved using:
138+
139+
- The :meth:`codeobject.co_positions` method in Python.
140+
- The :c:func:`PyCode_Addr2Location` function in the C API.
141+
134142
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
135143
and Ammar Askar in :issue:`43950`.)
136144

@@ -144,22 +152,6 @@ and Ammar Askar in :issue:`43950`.)
144152
or the :envvar:`PYTHONNODEBUGRANGES` environment variable.
145153

146154

147-
Column information for code objects
148-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149-
150-
The information used by the enhanced traceback feature is made available as a
151-
general API that can be used to correlate bytecode instructions with source
152-
code. This information can be retrieved using:
153-
154-
- The :meth:`codeobject.co_positions` method in Python.
155-
- The :c:func:`PyCode_Addr2Location` function in the C-API.
156-
157-
The :option:`-X` ``no_debug_ranges`` option and the environment variable
158-
:envvar:`PYTHONNODEBUGRANGES` can be used to disable this feature.
159-
160-
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
161-
and Ammar Askar in :issue:`43950`.)
162-
163155
Exceptions can be enriched with notes (PEP 678)
164156
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165157

0 commit comments

Comments
 (0)