[Python-Dev] More on contextlib - adding back a contextmanager decorator (original) (raw)

Aahz aahz at pythoncraft.com
Mon May 1 20:00:49 CEST 2006


On Tue, May 02, 2006, Greg Ewing wrote:

Nick Coghlan wrote:

the context expression in the with statement produces a context manager with enter and exit methods which set up and tear down a managed context for the body of the with statement. This is very similar to your later suggestion of context guard and guarded context. Currently I think I still prefer the term "guard", since it does a better job of conjuring up the same sort of idea as a try-finally.

"Guard" really doesn't work for me. It seems clear (especially in light of Fredrik's docs) that "wrapper" comes much closer to what's going on.

Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours." --Richard Bach



More information about the Python-Dev mailing list