Skip to content

Commit

Permalink
Fix incorrect links in ast docs (pythonGH-23017)
Browse files Browse the repository at this point in the history
  • Loading branch information
msuozzo authored and adorilson committed Mar 11, 2021
1 parent 9436820 commit 115b055
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Doc/library/ast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ Node classes
end_col_offset

Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have
:attr:`lineno`, :attr:`col_offset`, :attr:`lineno`, and :attr:`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` are the corresponding
UTF-8 byte offsets of the first and last tokens that generated the node.
The UTF-8 offset is recorded because the parser uses UTF-8 internally.
:attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and
: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`
are the corresponding UTF-8 byte offsets of the first and last tokens that
generated the node. The UTF-8 offset is recorded because the parser uses
UTF-8 internally.

Note that the end positions are not required by the compiler and are
therefore optional. The end offset is *after* the last symbol, for example
Expand Down

0 comments on commit 115b055

Please sign in to comment.