Re: [Python-Dev] multi-with statement

2009-05-03 Thread Nick Coghlan
(I still don't really have net access back after moving house - just chiming in briefly via my mobile) Anyway, I think there is one very good reason for NOT defining a multi- with statement in terms of an existing tuple: it gains us nothing except speed over contextlib.nested. The whole poin

Re: [Python-Dev] multi-with statement

2009-05-02 Thread R. David Murray
oN Sat, 2 May 2009 at 22:12, Georg Brandl wrote: I see; you want to construct your context manager programmatically and pass it to "with" without knowing what is in there. While this would be possible, we have to be aware that with this we would effectively change the context manager protocol, r

Re: [Python-Dev] multi-with statement

2009-05-02 Thread Georg Brandl
Fredrik Johansson schrieb: > On Sat, May 2, 2009 at 9:01 PM, Georg Brandl wrote: >> Hi, >> >> this is just a short notice that Mattias Brändström and I have finished a >> patch to implement the previously discussed and mostly warmly welcomed >> extension to with's syntax, allowing >> >> with A()

Re: [Python-Dev] multi-with statement

2009-05-02 Thread Alex Martelli
FWIW, I prefer Fredrik's wish too. Alex On Sat, May 2, 2009 at 12:26 PM, Fredrik Johansson < fredrik.johans...@gmail.com> wrote: > On Sat, May 2, 2009 at 9:01 PM, Georg Brandl wrote: > > Hi, > > > > this is just a short notice that Mattias Brändström and I have finished a > > patch to implement

Re: [Python-Dev] multi-with statement

2009-05-02 Thread Fredrik Johansson
On Sat, May 2, 2009 at 9:01 PM, Georg Brandl wrote: > Hi, > > this is just a short notice that Mattias Brändström and I have finished a > patch to implement the previously discussed and mostly warmly welcomed > extension to with's syntax, allowing > >   with A() as a, B() as b: > > to be written i

[Python-Dev] multi-with statement

2009-05-02 Thread Georg Brandl
Hi, this is just a short notice that Mattias Brändström and I have finished a patch to implement the previously discussed and mostly warmly welcomed extension to with's syntax, allowing with A() as a, B() as b: to be written instead of with A() as a: with B() as b: This syntax was