https://github.com/python/cpython/commit/b03ea0d418fdb635b12bc9c1f04f98cb43e043c5 commit: b03ea0d418fdb635b12bc9c1f04f98cb43e043c5 branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2026-09-28T18:32:40+03:00 summary:
[3.15] gh-137528: Document the co_linetable code object attribute (GH-151425) (#157902) Co-authored-by: Harjoth Khara <[email protected]> files: M Doc/reference/datamodel.rst diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 01fa56656948bfb..06176be88e07392 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]
