Skip to content
main
Switch branches/tags
cpython/Include/
cpython/Include/

Latest commit

This PR is part of PEP 657 and augments the compiler to emit ending
line numbers as well as starting and ending columns from the AST
into compiled code objects. This allows bytecodes to be correlated
to the exact source code ranges that generated them.

This information is made available through the following public APIs:

* The `co_positions` method on code objects.
* The C API function `PyCode_Addr2Location`.

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
98eee94

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

The Python C API

The C API is divided into three sections:

  1. Include/: Limited API
  2. Include/cpython/: CPython implementation details
  3. Include/internal/: The internal API

Information on changing the C API is available in the developer guide