Nick Coghlan <[email protected]> added the comment: Actually, the singleton idea isn't a bad one, but I'd go one step further and skip the factory function as well. So change that to be:
class NullContext(): ... # as per nullcontext in my last message nullcontext = NullContext() (with the example in the docstring adjusted accordingly) ---------- _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue10049> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
