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
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.
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)