Skip to content

gh-123958: apply docstring removal optimization in ast_opt instead of codegen #123959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Sep 11, 2024

@JelleZijlstra
Copy link
Member

Do we have a test case like this?

def f():
    "docstring"
    "some random string"

I haven't checked but your code looks like it may end up putting some random string in __doc__.

@iritkatriel
Copy link
Member Author

Do we have a test case like this?

def f():
    "docstring"
    "some random string"

I haven't checked but your code looks like it may end up putting some random string in __doc__.

It would turn some random string into an f-string to prevent that. I agree we should have this test.

@iritkatriel iritkatriel enabled auto-merge (squash) September 11, 2024 16:44
@iritkatriel iritkatriel merged commit e07154f into python:main Sep 11, 2024
39 checks passed
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.

2 participants