[issue10049] Add a "no-op" (null) context manager to contextlib

Hrvoje Nikšić report at bugs.python.org
Sat Oct 9 16:36:48 CEST 2010


Hrvoje Nikšić <hniksic at gmail.com> added the comment:

Here is a more complete patch that includes input from Nick, as well as the patch to test_contextlib.py and the documentation.

For now I've retained the function-returning-singleton approach for consistency and future extensibility.

----------
keywords: +patch
Added file: http://bugs.python.org/file19176/nullcontext.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10049>
_______________________________________


More information about the Python-bugs-list mailing list