Martin Blais added the comment:

I've been looking for this today; I would have used it.

Instead of an obvious (and explicit) null context manager, I had to read 
through this entire thread to eventually find out that I can use something 
called ExitStack(), which is designed for another use case.

When many users have to replicate the same boilerplate code time and time 
again, it's not cruft, it's just something that ought to be part of the stdlib. 
There are a number of such cases in the stdlib. I think nullcontext should be 
part of the included batteries Python aims to provide.

----------
nosy: +Martin Blais

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10049>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to