Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Bug report
Bug description:
$ ./pythonPython3.14.0a4+ (heads/test:d906bde250,Feb22025,11:08:38) [GCC11.4.0]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>importast>>>a=ast.parse('i = 1; j = 2',mode='single')>>>print(ast.dump(a,indent=2))Interactive(body=[Assign(targets=[Name(id='i',ctx=Store())],value=Constant(value=1)),Assign(targets=[Name(id='j',ctx=Store())],value=Constant(value=2))])>>>ast.unparse(a)'j = 2'
My guess theast.parse() should probably error?
CPython versions tested on:
3.14, 3.12, 3.13, 3.11, 3.10
Operating systems tested on:
Linux