Skip to content

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

Merged
iritkatriel merged 4 commits into
python:mainfrom
iritkatriel:docstring
Sep 11, 2024
Merged

gh-123958: apply docstring removal optimization in ast_opt instead of codegen#123959
iritkatriel merged 4 commits into
python:mainfrom
iritkatriel:docstring

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Sep 11, 2024

Copy link
Copy Markdown
Member

@JelleZijlstra

Copy link
Copy Markdown
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
Copy Markdown
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
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