[Python-ideas] unpacking context managers in WITH statement

Yury Selivanov yselivanov.ml at gmail.com
Fri Feb 3 19:06:56 CET 2012

On 2012-02-03, at 12:50 PM, Michael Foord wrote:

> with *ctxs as tuple_of_results:

This is not necessary, as 'ctxs' already holds all instances of
all context managers; so the 'ctxs' would be equal to 'tuple_of_results'

> with *ctx, other as tuple_of_results, another:
>     ...

Looks useful to me.


More information about the Python-ideas mailing list