[issue16610] Silent StopIteration exc when raised from generator inside of another generator

2012-12-04 Thread Stepan Wagner
Stepan Wagner added the comment: Thank you, I wasn't paying attention enough. It works as you describe. On Tue, Dec 4, 2012 at 9:46 PM, R. David Murray wrote: > > R. David Murray added the comment: > > The only way I was able to replicate that result was by removing the &g

[issue16610] Silent StopIteration exc when raised from generator inside of another generator

2012-12-04 Thread Stepan Wagner
Stepan Wagner added the comment: OK, thanks for explanation. The behaviour is still strange, because when I delete try...except clause from wrap, the StopIteration exc from emptygen terminates the program with traceback. On Tue, Dec 4, 2012 at 9:14 PM, R. David Murray wrote: > > R.

[issue16610] Silent StopIteration exc when raised from generator inside of another generator

2012-12-04 Thread Stepan Wagner
New submission from Stepan Wagner: def emptygen(): # Or other more meaningful generator raise StopIteration yield def wrap(gen): next(gen) print("This should be printed or StopIteration raised.") while True: try: yield next(gen)