[issue10049] Add a "no-op" (null) context manager to contextlib
STINNER Victor
report at bugs.python.org
Fri Oct 8 13:21:50 CEST 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
About your patch:
- __enter__() might return self instead of None... i don't really know which choice is better. "with Null() as x:" works in both cases
- __exit__() has no result value, "pass" is enough
- I don't like "Null" name, I prefer "Noop" (NoOperation, NoOp, ...) or something else
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10049>
_______________________________________
More information about the Python-bugs-list
mailing list