[Python-ideas] Anonymous blocks (again):

Juancarlo Añez apalala at gmail.com
Tue May 14 12:41:26 CEST 2013


Nick,

On Tue, May 14, 2013 at 2:06 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:

> Have you considered an iterator that produces context managers rather
> than the other way around?
>

What an interesting idea!

for c in self.closure():
    with c do:
        match_this()
        match_that()


I don't know yet if it's doable, but it certainly looks good. I'll try.

Thanks!

Cheers,

-- 
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130514/906f1608/attachment.html>


More information about the Python-ideas mailing list