[Python-ideas] allow tuples in a with statement?
mail at timgolden.me.uk
Tue Jan 13 21:43:32 CET 2009
Sturla Molden wrote:
> Sometimes multiple arguments in a with statement would be convinient.
> with open('in.txt','rt'), \
> open('err.txt','wt') \
> as fstdin, fstdout, fstderr:
> But today this has to be written as:
> with open('in.txt','rt') as fstdin:
> with open('out.txt','wt') as fstdout:
> with open('err.txt','wt') as fstderr:
> with the effect of causing multiple redundant levels of intendation.
More information about the Python-ideas