python / python/cpython

Docs: `co_exceptiontable` missing in Data Model (Code objects)

Open
#146,362 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Documentation

In the Data Model documentation for code objects:

https://docs.python.org/3/reference/datamodel.html#code-objects

The attribute co_exceptiontable (introduced in Python 3.11) is not listed or described.

This attribute is present on code objects and is used for exception handling.

Its absence in the documentation can be confusing for users working with bytecode or code objects.

It would be helpful to document co_exceptiontable, or clarify whether it is considered an implementation detail.

Happy to submit a PR if this is intended.

Linked PRs
  • gh-146370
  • gh-146405

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Data Model documentation's code objects section linked in the issue and compare its listed attributes with the Python 3.11 code-object API. Review linked PRs gh-146370 and gh-146405 first; the work is done when the status of co_exceptiontable is resolved and the documentation reflects that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.