Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow some unparenthesized syntactic structures in f-string expression part #159

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

gousaiyang
Copy link
Collaborator

Fixes #157, #158

@@ -154,5 +154,5 @@ strings: (STRING | fstring)+
fstring: FSTRING_START fstring_content* FSTRING_END
fstring_content: FSTRING_STRING | fstring_expr
fstring_conversion: '!' NAME
fstring_expr: '{' testlist_comp [ fstring_conversion ] [ fstring_format_spec ] '}'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I wonder why this is different than 3.7+

@isidentical
Copy link
Collaborator

Thanks @gousaiyang

@isidentical isidentical merged commit b08b61b into davidhalter:master Nov 19, 2020
@gousaiyang gousaiyang deleted the issue-158 branch November 19, 2020 18:16
thatch added a commit to thatch/LibCST that referenced this pull request Nov 21, 2020
Thanks to davidhalter/parso#159 for catching
that yield (as an expression, I suppose) is allowed on 3.7+
thatch added a commit to thatch/LibCST that referenced this pull request Nov 21, 2020
Thanks to davidhalter/parso#159 for catching
that yield (as an expression, I suppose) is allowed on 3.7+
thatch added a commit to thatch/LibCST that referenced this pull request Nov 24, 2020
Thanks to davidhalter/parso#159 for catching
that yield (as an expression, I suppose) is allowed on 3.6.
jimmylai pushed a commit to Instagram/LibCST that referenced this pull request Nov 30, 2020
* Support named unicode characters in f-strings

This is the same as my pull request
davidhalter/parso#160

* A small bugfix to what is allowed in f-string expressions

Thanks to davidhalter/parso#159 for catching
that yield (as an expression, I suppose) is allowed on 3.6.
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.

Unparenthesized yield is not allowed in the f-strings
2 participants