diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index ef6c62dca1e124..4daac538233097 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -91,11 +91,12 @@ Node classes end_lineno end_col_offset - Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have - :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` + 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 + :class:`ast.expr`, :class:`ast.stmt` and others (see + `Abstract Grammar `__). 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.