21 Mar
2009
21 Mar
'09
1:44 a.m.
Jacob Holm wrote:
the expansion in your PEP actually has the behaviour you expect for the GeneratorExit example because GeneratorExit doesn't inherit from Exception.
That's an accident, though, and it's possible I should have specified BaseException there. I still consider the explanation I gave to be the true one.
The other mismatch, concerning the missing "close" calls to the iterator, I still believe to be an issue.
Can you elaborate on that? I thought a first you were expecting the implicit close of the generator that happens before it's deallocated to be passed on to the subiterator, but some of your examples seem to have the close happening *before* the del gen, so I'm confused. -- Greg