`yield` in a `try/finally` block, pre-Python 2.5

Adam Atlas adam at atlas.st
Mon Jun 4 09:57:56 EDT 2007


On Jun 4, 1:49 am, yuce <yucete... at gmail.com> wrote:
> I had the same problem, you can see:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/130004
> for a solution.
>
> Happy hacking,
>
> Yuce

Thanks. I thought of doing something like that, but in my program,
it's important that the order follow the actual nesting order. That
is, I have a few nested generator each of which has its own 'finally',
and I need the innermost ones to run first. How can I deal with that?




More information about the Python-list mailing list