FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-123958: apply docstring removal optimization in ast_opt instead of codegen by iritkatriel · Pull Request #123959 · python/cpython · GitHub

/ cpython Public

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 commented Sep 11, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

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__.

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 enabled auto-merge (squash) September 11, 2024 16:44
iritkatriel merged commit e07154f into python:main Sep 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL