More on "with" statement

Erik Max Francis max at
Sat Jul 14 09:23:01 CEST 2001

Roman Suzi wrote:

> > That's just plain more efficient.  Four additions and one multiply
> four?

Yes, typo.  Three, obviously.

> The same with "with": it could make name-resolving more efficient
> by allowing searching some namespaces ahead of locals() and
> globals()...

Or you could just make a temporary assignment.  Same thing going on, no
need for a new keyword and ambiguous code.

 Erik Max Francis / max at /
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ God is love, but get it in writing.
\__/ Gypsy Rose Lee
    Kepler's laws /
 A proof of Kepler's laws.

More information about the Python-list mailing list