Skip to content

Commit 48bb230

Browse files
[3.14] gh-137528: Document the co_linetable code object attribute (GH-151425) (GH-157946)
(cherry picked from commit c444710) Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
1 parent e0d57fc commit 48bb230

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎Doc/reference/datamodel.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,16 @@ Special read-only attributes
15581558
This attribute of code objects is deprecated, and may be removed in
15591559
Python 3.15.
15601560

1561+
* - .. attribute:: codeobject.co_linetable
1562+
- A :class:`bytes` object containing encoded source location information.
1563+
The exact format is an implementation detail and may change between
1564+
Python versions. Use :meth:`~codeobject.co_lines` and
1565+
:meth:`~codeobject.co_positions` for supported access to line and
1566+
position information. To create a modified copy of a code object,
1567+
use :meth:`~codeobject.replace`.
1568+
1569+
.. versionadded:: 3.10
1570+
15611571
* - .. attribute:: codeobject.co_stacksize
15621572
- The required stack size of the code object
15631573

0 commit comments

Comments
 (0)