Author gpolo
Recipients gpolo
Date 2009-02-11.19:32:41
SpamBayes Score 5.31214e-05
Marked as misclassified No
Message-id <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

I find it weird that given this sample code:

def g():
    yield iter(None)
list(*g())

I get this traceback:

Traceback (most recent call last):
  File "a1.py", line 3, in <module>
    list(*g())
TypeError: type object argument after * must be a sequence, not generator

At a minimum the exception message looks awkward to me. With the
proposed patch, the new traceback would be:

Traceback (most recent call last):
  File "a1.py", line 3, in <module>
    list(*g())
  File "a1.py", line 2, in g
    yield iter(None)
TypeError: 'NoneType' object is not iterable
History
Date User Action Args
2009-02-11 19:32:43gpolosetrecipients: + gpolo
2009-02-11 19:32:43gpolosetmessageid: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za>
2009-02-11 19:32:42gpololinkissue5218 messages
2009-02-11 19:32:42gpolocreate