Thanks to visit codestin.com Credit goes to github.com
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 bcff99c commit fae5761Copy full SHA for fae5761
1 file changed
Doc/library/ast.rst
@@ -131,6 +131,14 @@ Node classes
131
Simple indices are represented by their value, extended slices are
132
represented as tuples.
133
134
+.. versionchanged:: 3.13
135
+
136
+ AST node constructors were changed to provide sensible defaults for omitted
137
+ fields: optional fields now default to ``None``, list fields default to an
138
+ empty list, and fields of type :class:`!ast.expr_context` default to
139
+ :class:`Load() <ast.Load>`. Previously, omitted attributes would not exist on constructed
140
+ nodes (accessing them raised :exc:`AttributeError`).
141
142
.. versionchanged:: 3.14
143
144
The :meth:`~object.__repr__` output of :class:`~ast.AST` nodes includes
0 commit comments