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:
Given the following code snippet:
importastsource=b'class A:\n """\n """\n'compile(ast.parse(source),"a","exec")
python3.13 -OO test.py passes, butpython3.14 -OO test.py fails, with:
Traceback (mostrecentcalllast):File"/Users/tybug/Desktop/sandbox2.py",line7,in<module>compile(ast.parse(source),"a","exec")ValueError:emptybodyonClassDef
Python: 3.14.0rc1
CPython versions tested on:
3.14
Operating systems tested on:
macOS