Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

compile fails on 3.14 on a valid expression when-OO is set #137308

Closed
Labels
3.14bugs and security fixes3.15new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
@Liam-DeVoe

Description

@Liam-DeVoe

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

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp