Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,7 @@ indirectly) to mutable objects.
single: co_cellvars (code object attribute)
single: co_freevars (code object attribute)
single: co_qualname (code object attribute)
single: co_exceptiontable (code object attribute)

Special read-only attributes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1549,6 +1550,10 @@ Special read-only attributes
- An :class:`integer <int>` encoding a number of flags for the
interpreter.

* - .. attribute:: co_exceptiontable
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the code object attribute table, this entry should use the same fully-qualified attribute name style as the others (e.g., codeobject.co_name). Using .. attribute:: co_exceptiontable here is inconsistent and may prevent correct cross-referencing/indexing for the attribute.

Suggested change
* - .. attribute:: co_exceptiontable
* - .. attribute:: codeobject.co_exceptiontable

Copilot uses AI. Check for mistakes.
- A bytes object representing the exception handling table used by the interpreter.
This attribute was introduced in Python 3.11.

Comment on lines +1554 to +1556
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new attribute description doesn’t follow the version annotation/style used elsewhere in this table. Consider using :class:bytes`` (instead of plain “bytes object”) and the standard .. versionadded:: 3.11 directive rather than an inline sentence, to match surrounding entries like `co_qualname`/`co_positions`.

Suggested change
- A bytes object representing the exception handling table used by the interpreter.
This attribute was introduced in Python 3.11.
- A :class:`bytes` object representing the exception handling table used
by the interpreter.
.. versionadded:: 3.11

Copilot uses AI. Check for mistakes.
.. index:: pair: object; generator

The following flag bits are defined for :attr:`~codeobject.co_flags`:
Expand Down
Loading