We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Python 3.8 added support for the = specifier in f-strings to provide self documenting expressions. Using this feature makes a file fail to compile.
=
To Reproduce
test.py:
x = 1 print(f"{x=}")
then run:
$ python test.py x=1 $ cython -3 test.py Error compiling Cython file: ------------------------------------------------------------ ... x = 1 print(f"{x=}") ^ ------------------------------------------------------------ test.py:2:13: Expected ')', found '='
Expected behavior No error compiling the file
Environment (please complete the following information):
Additional context
https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging
The text was updated successfully, but these errors were encountered:
I can confirm this also in Cython==3.0a6 on windows.
Sorry, something went wrong.
Probably easy to implement in Parsing.py. PR welcome.
Parsing.py
Self documenting f-strings (GH-3939)
0962824
Closes #3796
Successfully merging a pull request may close this issue.
Describe the bug
Python 3.8 added support for the
=
specifier in f-strings to provide self documenting expressions. Using this feature makes a file fail to compile.To Reproduce
test.py:
then run:
Expected behavior
No error compiling the file
Environment (please complete the following information):
Additional context
https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging
The text was updated successfully, but these errors were encountered: