Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.3k
gh-146362: Docs: add co_exceptiontable to code object documentation#146370
gh-146362: Docs: add co_exceptiontable to code object documentation#146370SHAHID-glitch wants to merge 2 commits intopython:mainfrom
Conversation
python-cla-botbot commentedMar 24, 2026 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
Adds missing documentation for thecode object attributeco_exceptiontable (introduced in Python 3.11) to the Data Model reference, addressing docs issue#146362.
Changes:
- Add an index entry for
co_exceptiontableunder code object attributes. - Document
co_exceptiontablein the “Special read-only attributes” table.
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
| - An:class:`integer <int>` encoding a number of flags for the | ||
| interpreter. | ||
| * - .. attribute:: co_exceptiontable |
CopilotAIMar 24, 2026
There was a problem hiding this comment.
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.
| * - .. attribute:: co_exceptiontable | |
| * - .. attribute::codeobject.co_exceptiontable |
| - A bytes object representing the exception handling table used by the interpreter. | ||
| This attribute was introduced in Python 3.11. | ||
CopilotAIMar 24, 2026
There was a problem hiding this comment.
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`.
| - 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 |
picnixz commentedMar 24, 2026
Closing because the OP already suggested doing it. In addition, read our policy on LLMs:https://devguide.python.org/getting-started/generative-ai/. |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#146362
Added documentation for the
co_exceptiontableattribute in the code objects section of the data model.📚 Documentation preview 📚:https://cpython-previews--146370.org.readthedocs.build/
co_exceptiontablemissing in Data Model (Code objects) #146362