We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b52432c commit b37c994Copy full SHA for b37c994
Doc/library/ast.rst
@@ -1503,6 +1503,13 @@ Async and await
1503
fields as :class:`For` and :class:`With`, respectively. Only valid in the
1504
body of an :class:`AsyncFunctionDef`.
1505
1506
+.. note::
1507
+ When a string is parsed by :func:`ast.parse`, operator nodes (subclasses
1508
+ of :class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`,
1509
+ :class:`ast.boolop` and :class:`ast.expr_context`) on the returned tree
1510
+ will be singletons. Changes to one will be reflected in all other
1511
+ occurrences of the same value (e.g. :class:`ast.Add`).
1512
+
1513
1514
:mod:`ast` Helpers
1515
------------------
0 commit comments