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.
In Python 3.13, AST node constructors now provide defaults for the omitted fields:
None
expr_context
Load()
Previously in Python 3.12 and earlier, these omitted fields would not exist as attributes, causing AttributeError when accessed.
AttributeError
These information can be found in What’s New In Python 3.13, but not in the ast documentation itself.
ast
Since this is a significant behavioral change, it should be documented in the ast module documentation with a .. versionchanged:: 3.13 directive.
.. versionchanged:: 3.13
Documentation
In Python 3.13, AST node constructors now provide defaults for the omitted fields:
Noneexpr_contextfields: default toLoad()Previously in Python 3.12 and earlier, these omitted fields would not exist as attributes, causing
AttributeErrorwhen accessed.These information can be found in What’s New In Python 3.13, but not in the
astdocumentation itself.Since this is a significant behavioral change, it should be documented in the
astmodule documentation with a.. versionchanged:: 3.13directive.Linked PRs