[Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt) (original) (raw)
Phillip J. Eby pje at telecommunity.com
Wed Apr 19 17:31:57 CEST 2006
- Previous message: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)
- Next message: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 11:41 PM 4/19/2006 +1000, Nick Coghlan wrote:
Given that naming though, I think contextlib.contextmanager should be renamed to contextlib.context.
The name is actually correct under this terminology arrangement. @contextmanager returns a context manager. It happens to also be a context, but that's not important. "With" takes a context manager expression.
- Previous message: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)
- Next message: [Python-Dev] Why are contexts also managers? (was r45544 - peps/trunk/pep-0343.txt)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]