[Python-ideas] with statement: multiple context manager

Eli Courtwright eli at courtwright.org
Sun Mar 1 20:53:28 CET 2009


On Sun, Mar 1, 2009 at 2:46 PM, Guido van Rossum <guido at python.org> wrote:
> I am sympathetic to this desire -- I think we almost added this to the
> original PEP but decided to hold off until a clear need was found.

I second the motion to have this syntax added to the language.  I've
often had to write nested with blocks to open one file for reading and
another for writing.

 - Eli



More information about the Python-ideas mailing list