Skip to content

parser needs special handling of self-documenting f-strings #5970

@davidszotten

Description

@davidszotten

python 3.8 and https://bugs.python.org/issue36817 (note no pep "was needed")
added self documenting expressions for f-strings

f"{a=}" is now short-hand for f"a={a}"

in the parser the self-documented syntax above generates the same expression nodes as the expanded version, which (i think?) means we can't distinguish them. i suppose we need to actually preserve this info in the ast, e.g. by adding self_documenting (currently a free var in the parser) to the node or similar

Metadata

Metadata

Assignees

Labels

parserRelated to the parser

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions