[Python-bugs-list] [ python-Bugs-466173 ] unpack TypeError unclear

noreply@sourceforge.net noreply@sourceforge.net
Fri, 28 Sep 2001 13:03:39 -0700


Bugs item #466173, was opened at 2001-09-28 12:47
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=466173&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
Assigned to: Tim Peters (tim_one)
Summary: unpack TypeError unclear

Initial Comment:
I liked the error message in Python 2.1 better than the
2.2 error message for cases like this one:
    a, b = 1

It uses to say unpack non-sequence.  Not is says iter()
of non-sequence.  Since the iter() call is hidden, I'd
prefer to see it's specific error message hidden, too.
 To the user, it's just an error unpacking a sequeunce.


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-28 13:03

Message:
Logged In: YES 
user_id=6380

This has been discussed before. The iter() call doesn't know
that it's called from a sequence unpack, so it's hard to get
the old message back. As a compromise, I suggest to change
the message not to refer to iter(), but to the more abstract
concept of iteration, e.g. "iteration over non-sequence".

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=466173&group_id=5470