-
Notifications
You must be signed in to change notification settings - Fork 896
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
Crash when unpacking in yield #830
Comments
Which version of Python is used for yapf itself? Crashes like this are usually caused by either syntactically incorrect input or by a recent change to the Python grammar that hasn't yet shown up in lib2to3 (which yapf uses). My guess it's the latter. |
The example code seems to use a Python 3.8 feature:
|
I only have python3.8 installed on my system. Both yapf and the example code run under that version. |
The problem isn't with Python 3.8, as such ... it's because Python 3.8's version of lib2to3, which yapf uses to parse your source, hasn't been updated with the latest grammar changes, and therefore can't parse "yield i, *tup" (it also can't parse "if a:=foo()". There isn't likely to be a solution until this bug is resolved: https://bugs.python.org/issue36541 |
Use this sample file to reproduce the crash
which should output
Crash
Versions
The text was updated successfully, but these errors were encountered: