-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Error in error reporting. #8293
Comments
Update, this problem doesn't occur with Python-3, i.e. the correct traceback is shown for both the statements:
|
Might be a Python 2.7 bug. the frame does:
For which obviously getargs will fail. ... |
Then should it be escalated to the Python2.7 bug tracker? |
Yeah, trying to make a smaller example. |
Thanks! |
Sure, that might not be today though. |
Any updates on this? |
@Carreau the bug in
In
This code is trying to handle functions that look like this:
Tuple argument unpacking was removed in Python 3, which is why this issue only manifests in Python 2. The bytecode for a function like
The problem with all of this is that the bytecode for generator expressions uses the same machinery as tuple unpacking under the hood:
The disassembly of the bad expression is:
The issue here, ultimately, is the fact that the outer loop variable is passed to the inner function via a |
I don't know either. At least I'm happy that my patch could help you guys. |
The program to reproduce the error is the following:
The following error is produced:
Expected output is something along the lines of the following:
Tested against IPython
4.0.0-dev
(currentmaster
) and Python2.7.9
:The text was updated successfully, but these errors were encountered: