[Python-Dev] Re: anonymous blocks

Samuele Pedroni pedronis at strakt.com
Wed Apr 20 18:23:01 CEST 2005


>
>
>    def do():
>        print "setup"
>        try:
>            yield None
>        finally:
>            print "tear down"
>
> doesn't quite work (if it did, all you would need is syntactic sugar 
> for "for
> dummy in").
>
PEP325 is about that


More information about the Python-Dev mailing list