[Python-Dev] Why are contexts also managers? (was r45544 (original) (raw)

[Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)

Phillip J. Eby pje at telecommunity.com
Fri Apr 21 21:12:27 CEST 2006


At 06:54 PM 4/21/2006 +0100, Guido van Rossum wrote:

Phillip, I do recomment you look at decimal.py. If we're not reversing the PEP changes, that module needs to be changed; it has a class Context (that was always there) with a context method which returns an instance of a class ContextManager (newly created for the with-statement). This looks backwards from the PEP's current POV.

I don't mind doing the work to change it, as long as you first pronounce on what the terminology should be. :) If it turns out my doc was wrong, I'll fix that. If not, I'll fix decimal.ContextManager. Or if both are wrong, I'll fix that too. Just tell me which it is. :)



More information about the Python-Dev mailing list