Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Feb 15, 2024

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I can't help thinking that extracting the docstring is the parser's or symbol table generator's job. Probably not worth the effort to change it though.

@iritkatriel
Copy link
Member Author

Looks good.

I can't help thinking that extracting the docstring is the parser's or symbol table generator's job. Probably not worth the effort to change it though.

Note that you can call compile with an optmization level different from the process' and you can give it an AST to compile. So the earliest we can do this is in AST optimization stage.

@iritkatriel iritkatriel merged commit 732faf1 into python:main Feb 15, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant NOP is generated in -OO mode

2 participants