Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
Is this desired behavior?
$ ./python -m astf'{""" # this is part of the string, it shouldn't be stripped out"""=}'Module( body=[ Expr( value=JoinedStr( values=[ Constant(value='""" \n"""='), FormattedValue( value=Constant(value=" # this is part of the string, it shouldn't be stripped out\n"), conversion=114)]))])$ ./python -m astt'{""" # this is part of the string, it shouldn't be stripped out"""=}'Module( body=[ Expr( value=TemplateStr( values=[ Constant(value='""" \n"""='), Interpolation( value=Constant(value=" # this is part of the string, it shouldn't be stripped out\n"), str='""" \n"""', conversion=114)]))])Even if they are not actually multiline:
$ python -m astt'{" # nooo "=}'Module( body=[ Expr( value=TemplateStr( values=[ Constant(value='" '), Interpolation( value=Constant(value=' # nooo '), str='"', conversion=114)]))])Seems to go back to 3.12
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done