-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
gh-146362: Docs: add co_exceptiontable to code object documentation #146370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||||||||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||||||||||
|
|
@@ -1549,6 +1550,10 @@ Special read-only attributes | |||||||||||||
| - An :class:`integer <int>` encoding a number of flags for the | ||||||||||||||
| interpreter. | ||||||||||||||
|
|
||||||||||||||
| * - .. attribute:: co_exceptiontable | ||||||||||||||
| - 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
|
||||||||||||||
| - 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 |
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_exceptiontablehere is inconsistent and may prevent correct cross-referencing/indexing for the attribute.