https://github.com/python/cpython/commit/c4447105ab82f55de45d9a675873e815a8b81357
commit: c4447105ab82f55de45d9a675873e815a8b81357
branch: main
author: Harjoth Khara <[email protected]>
committer: encukou <[email protected]>
date: 2026-09-21T14:01:39+02:00
summary:
gh-137528: Document the co_linetable code object attribute (GH-151425)
files:
M Doc/reference/datamodel.rst
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 00a80010543be17..c860a3356628af1 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1557,6 +1557,16 @@ Special read-only attributes
* - .. attribute:: codeobject.co_firstlineno
- The line number of the first line of the function
+ * - .. attribute:: codeobject.co_linetable
+ - A :class:`bytes` object containing encoded source location information.
+ The exact format is an implementation detail and may change between
+ Python versions. Use :meth:`~codeobject.co_lines` and
+ :meth:`~codeobject.co_positions` for supported access to line and
+ position information. To create a modified copy of a code object,
+ use :meth:`~codeobject.replace`.
+
+ .. versionadded:: 3.10
+
* - .. attribute:: codeobject.co_stacksize
- The required stack size of the code object
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]