Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Closed
Description
>>> ast.parse(ast.Constant(42))Constant(value=42, kind=None)>>> ast.parse(ast.Constant(42), optimize=True)Traceback (most recent call last): File "<python-input-4>", line 1, in <module> ast.parse(ast.Constant(42), optimize=True) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/ast.py", line 53, in parse return compile(source, filename, mode, flags, _feature_version=feature_version, optimize=optimize)TypeError: expected Module node, got Constant
(This came up while implementing PEP 765#130080).