Hrvoje Nikšić <hnik...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue10049> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com