Skip to content
Prev Previous commit
Next Next commit
Accept suggestions
  • Loading branch information
donbarbos committed May 5, 2025
commit f2d0e391aa996c36c3147bdabc7c6e1a6942850d
4 changes: 2 additions & 2 deletions Doc/library/ast.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:mod:`!ast` --- Abstract Syntax Trees
:mod:`!ast` --- Abstract syntax trees
=====================================

.. module:: ast
Expand Down Expand Up @@ -2152,11 +2152,11 @@
body of an :class:`AsyncFunctionDef`.

.. note::
When a string is parsed by :func:`ast.parse`, operator nodes (subclasses

Check warning on line 2155 in Doc/library/ast.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:class reference target not found: ast.operator [ref.class]

Check warning on line 2155 in Doc/library/ast.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:class reference target not found: ast.unaryop [ref.class]

Check warning on line 2155 in Doc/library/ast.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:class reference target not found: ast.cmpop [ref.class]

Check warning on line 2155 in Doc/library/ast.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:class reference target not found: ast.boolop [ref.class]

Check warning on line 2155 in Doc/library/ast.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:class reference target not found: ast.expr_context [ref.class]
of :class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`,
:class:`ast.boolop` and :class:`ast.expr_context`) on the returned tree
will be singletons. Changes to one will be reflected in all other
occurrences of the same value (e.g. :class:`ast.Add`).
occurrences of the same value (for example, :class:`ast.Add`).


:mod:`ast` helpers
Expand Down
5 changes: 3 additions & 2 deletions Lib/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,8 @@ def main(args=None):
help='indentation of nodes (number of spaces)')
parser.add_argument('--feature-version',
type=str, default=None, metavar='VERSION',
help='python version in the format 3.x (e.g., 3.10)')
help='Python version in the format 3.x '
'(for example, 3.10)')
parser.add_argument('-O', '--optimize',
type=int, default=-1, metavar='LEVEL',
help='optimization level for parser (default -1)')
Expand All @@ -668,7 +669,7 @@ def main(args=None):
major, minor = map(int, args.feature_version.split('.', 1))
except ValueError:
parser.error('Invalid format for --feature-version; '
'expected format 3.x (e.g., 3.10)')
'expected format 3.x (for example, 3.10)')

feature_version = (major, minor)

Expand Down
Loading