[issue23949] Number of elements display in error message is wrong while unpacking in traceback
Arnon Yaari
report at bugs.python.org
Wed Apr 15 18:31:38 CEST 2015
Arnon Yaari added the comment:
I fixed the tests (that's important!) and changed the latter message to specify it is referring to the starred target (the term "starred target" appears in the docs in simple_stmts.rst). Looks like the number in that message was wrong before!
The test looked like this:
>>> a, *b, c, d, e = 0, 1, 2
ValueError: need more than 3 values to unpack
Need more than 3? Not exactly.
The new message looks like this:
>>> a, *b, c, d, e = 0, 1, 2
ValueError: not enough values to unpack into starred target (expected at least 4, got 3)
----------
Added file: http://bugs.python.org/file39041/issue23949-1.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23949>
_______________________________________
More information about the Python-bugs-list
mailing list