[Python-Dev] Terminology for PEP 343 (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jul 5 09:01:00 CEST 2005


Phillip J. Eby wrote:

At 11:48 PM 7/3/2005 -0400, Raymond Hettinger wrote:

with contextexpression as variable: # perform actions within a context

The "with" statement establishes a context in which some operations are to be performed.

I like this.

The object produced by 'contextexpression' must have entercontext and exitcontext methods, which will be invoked by the "with" statement when the context is entered...

And we could call this the "context protocol".

Greg



More information about the Python-Dev mailing list