Message281177
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. |
|
Date |
User |
Action |
Args |
2016-11-18 22:59:00 | Martin Blais | set | recipients:
+ Martin Blais, georg.brandl, rhettinger, ncoghlan, pitrou, vstinner, giampaolo.rodola, hniksic, eric.araujo, r.david.murray, michael.foord, daniel.urban, piotr.dobrogost, Alexander.Jones, DLitz |
2016-11-18 22:59:00 | Martin Blais | set | messageid: <1479509940.36.0.119618555788.issue10049@psf.upfronthosting.co.za> |
2016-11-18 22:59:00 | Martin Blais | link | issue10049 messages |
2016-11-18 22:59:00 | Martin Blais | create | |
|