[Python-checkins] r45544 - peps/trunk/pep-0343.txt (original) (raw)

phillip.eby python-checkins at python.org
Tue Apr 18 20:55:18 CEST 2006


Author: phillip.eby Date: Tue Apr 18 20:55:17 2006 New Revision: 45544

Modified: peps/trunk/pep-0343.txt Log: Make "context" vs. "context manager" terminology consistent. Originally, there were only context managers, so a lot of text referred to context managers that now should refer to contexts since the context method was added. All contexts are context managers, so these references were technically correct in some sense, but are easier to understand if the more-specific terms are used.

Modified: peps/trunk/pep-0343.txt

--- peps/trunk/pep-0343.txt (original) +++ peps/trunk/pep-0343.txt Tue Apr 18 20:55:17 2006 @@ -265,8 +265,8 @@ threading.RLock) may provide its own enter() and exit() methods, and simply return 'self' from its context method. On the other hand, an object with more complex state requirements

@@ -473,9 +473,9 @@ This PEP proposes that the protocol used by the with statement be known as the "context management protocol", and that objects that implement that protocol be known as "context managers". The term

@@ -529,10 +529,11 @@ on python-dev [4] settled on the term "context manager" for objects which provide enter and exit methods, and "context management protocol" for the protocol itself. With the

@@ -541,9 +542,9 @@ appropriate enter and exit methods for decimal.Context [5]. This approach allows a class to define a native context manager using generator syntax. It also allows a class to use an

@@ -558,10 +559,10 @@ 342 [6]. Guido rejected this idea [7]. The following are some of benefits of keeping the enter and exit methods:



More information about the Python-checkins mailing list