[Python-ideas] Nested with statements
spir
denis.spir at free.fr
Tue Apr 28 11:04:25 CEST 2009
Le Mon, 27 Apr 2009 20:54:58 +0100,
Arnaud Delobelle <arnodel at googlemail.com> s'exprima ainsi:
> > with A(), B() as a,b:
> > # Code that uses a and b.
> >
> > This would translate directly to:
> >
> > with A() as a:
> > with B() as b:
> > # Code that uses a and b.
>
> There was a discussion about this on this list:
>
> http://mail.python.org/pipermail/python-ideas/2009-March/003188.html
>
> I can't remember the outcome.
There was no clear outcome, for sure ;-)
Except maybe it was stated that
with A(), B() as a,b:
should rather be spelled
with A() as a, B() as b:
to reuse the syntax of imports.
Denis
------
la vita e estrany
More information about the Python-ideas
mailing list