-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca" #84611
Comments
With Python 3.9.0a6 we get the following syntax error when bytecompiling the standard library in Fedora: Compiling '/usr/lib64/python3.9/turtledemo/main.py'... I've looked and the bad code is there for all branches, but only with 3.9.0a6 I get the SyntaxError. I wonder whether this is a know new SyntaxError or not. This "worked" with 3.9.0a5: >>> "yes" if False else"no"
'no' Happy to submit a PR for turtledemo. |
I don't think that it's worth it to backport the change to 3.7 and 3.8: in Python 3.7 and 3.8, the code is accepted. I also reported the issue to: https://bugs.python.org/issue40334#msg367580 Miro: are you ok to close the issue (not backport)? |
I am OK. I don't see why not to backport it, but I don't care much. |
Python 3.7 and 3.8 are not broken, so there is no need to fix them :-) Thanks for the fix. I reported the issue to: |
I think we could very reasonably change While it's a low priority issue since it doesn't raise an error, that doesn't necessarily mean it's correct. In the latest stable version of the stdlib, we should aim to provide a good example IMO, especially if it comes at practically zero cost to us. |
If you backport the change, please remove the NEWS entry, since it's not a SyntaxError in 3.7 and 3.8. |
Victor Stinner wrote:
Good point. In that case, I'll do a manual backport of the PR just to 3.8 and skip the news entry. As mentioned above, I think most of the value in fixing it when the SyntaxError isn't present is mainly just for providing a good example in the latest stable version of the stdlib, so I don't think there would be much additional value in also backporting it to 3.7. |
Ok, the typo is now fixed in 3.7, 3.8 and master branches ;-) Thanks Miro for the bug reportand Kyle for the backport. |
I believe the file was synchronized across versions as new features have not recently been added. Backporting the fix to my typo should keep it that way. This is an example of why code review even of patches that 'work' is a good thing. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: