-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)testsTests in the Lib/test dirTests in the Lib/test dir
Description
astfold_body
has a block of code that checks whether const folding created something that looks like a docstring, which was not there before. If it did, then we have a string that came out of folding a const expression. This is not recognised by Python as a docstring, so in order to prevent the compiler from recognising it as such, the astfold_body
converts the AST node into a const f-string node (_PyAST_JoinedStr
), which is also not recognised as a docstring.
This is not covered by tests, so it took me a while to figure out what's going on. I'll add the test.
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)testsTests in the Lib/test dirTests in the Lib/test dir