Georg Brandl added the comment:
This only happens in Python 2.5, where GeneratorExit inherits from
Exception. In 2.6, it inherits from BaseException and is therefore not
caught by the except clause.
--
resolution: -> out of date
status: open -> closed
New submission from xiscu :
In the documentation the is:
...
>>>generator.throw(TypeError, "spam")
TypeError('spam',)
>>> generator.close()
Don't forget to clean up when 'close()' is called.
...
I'm getting:
>>>generator.throw(TypeError, "spam")
TypeError('spam',)
>>> generator.close()
Tracebac