-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
The ValueError raised by failing to unpack sequence should have more information. #47321
Comments
Here's the current message: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> [foo] = [2, 3]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: too many values to unpack It would be good if the message of the ValueError contained information |
Would you like to submit a patch? |
What would happen with infinite iterables? import itertools
[foo] = itertools.count() |
The code that raises the error is in ceval.c which is a critical path. Until then I'm closing as WONTFIX. |
Here's a patch implementing part of the requested feature. pystones cannot tell the difference between trunk@HEAD with or without |
I was looking at 3.x, JP's patch is relative to 2.x and takes a little The original feature request was that the error message be better if, |
Applied patch in r82759. |
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: