Skip to content

gh-136640: Clarify the documentation of the AST module - #136868

Closed
mlnrt wants to merge 2 commits into
python:mainfrom
mlnrt:fix-issue-136640
Closed

mlnrt wants to merge 2 commits into
python:mainfrom
mlnrt:fix-issue-136640

Conversation

@mlnrt

@mlnrt mlnrt commented Jul 20, 2025 •

Copy link
Copy Markdown
Contributor

This PR clarifies the documentation describing the attributes of classes part of the AST module


📚 Documentation preview 📚: https://cpython-previews--136868.org.readthedocs.build/

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks @mlnrt for working on this during the EuroPython sprints! I'll wait for an AST expert to review before merging. cc: @JelleZijlstra @Eclips4

A

Comment thread Doc/library/ast.rst
:attr:`end_col_offset` attributes. The :attr:`lineno` and :attr:`end_lineno`
are the first and last line numbers of source text span (1-indexed so the
first line is line 1) and the :attr:`col_offset` and :attr:`end_col_offset`
Most classes part of the AST module have the :attr:`lineno`, :attr:`col_offset`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Most classes part of the AST module have the :attr:`lineno`, :attr:`col_offset`,
Most classes in the :mod:`!ast` module have the :attr:`lineno`, :attr:`col_offset`,

Comment thread Doc/library/ast.rst
are the first and last line numbers of source text span (1-indexed so the
first line is line 1) and the :attr:`col_offset` and :attr:`end_col_offset`
Most classes part of the AST module have the :attr:`lineno`, :attr:`col_offset`,
:attr:`end_lineno`, and :attr:`end_col_offset` attributes, including subclasses of

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
:attr:`end_lineno`, and :attr:`end_col_offset` attributes, including subclasses of
:attr:`end_lineno`, and :attr:`end_col_offset` attributes, including all subclasses of

@mlnrt mlnrt closed this by deleting the head repository Oct 11, 2025
@AA-Turner

Copy link
Copy Markdown
Member

@mlnrt did you intend to close this?

A

@mlnrt

mlnrt commented Oct 11, 2025

Copy link
Copy Markdown
Contributor Author

@AA-Turner no. I just deleted my fork of cpython. I did not realized it would close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge docs Documentation in the Doc dir needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes skip news sprint

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants