Phillip J. Eby wrote:
> At 07:47 AM 1/10/2007 -0800, Guido van Rossum wrote:
>> BTW perhaps we should add the same semantics and syntax to 'with expr
>> as var'? I can't think of a reasonable use case
> [snip]
>> ... for using anything
>> more complex than a local variable, BTW.)
> 
> with multi(ctx1, ctx2, ...)  as var1, var2, ...:
> 
> (if multi is a function that returns a context manager wrapping the other 
> contexts and returning the tuple their __enter__ values).

...a utility which is also known as contextlib.nested().

For some strange reason, I suspect you're familiar with that particular 
context manager ;)

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to