[issue3071] The ValueError raised by failing to unpack sequence should have more information.

Jack Diederich report at bugs.python.org
Mon Jul 27 02:12:36 CEST 2009


Jack Diederich <jackdied at gmail.com> added the comment:

The code that raises the error is in ceval.c which is a critical path. 
The raise is done as soon the iterator has one more item than is needed
(see Daniel Diniz's comments on infinite iterators).  While the check
could return more useful information for known non-infinite iterators
(tuples, lists, etc) it would have to do a big if/else for all the core
types (but excluding their subclasses!).  If someone wants to submit
that patch and a benchmark that shows no slowdown I'll reopen the bug.

Until then I'm closing as WONTFIX.

----------
nosy: +jackdied
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3071>
_______________________________________


More information about the Python-bugs-list mailing list