Using win32 python 2.4.1, I have a minimal test program:

def generate():
    raise TypeError('blah')
    yield ""

print "\n".join((generate()))

Executing the program gives:

Traceback (most recent call last):
  File "<stdin>", line 5, in ?
TypeError: sequence expected, generator found

replacing TypeError with Exception gives what I would have expected: a
traceback starting from the raise statement. I'm not relying on one
behavior or the other, but I had a TypeError in a generator, and the
funny exception slowed me down finding it.

p

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to