This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Martin Blais
Recipients Alexander.Jones, DLitz, Martin Blais, daniel.urban, eric.araujo, georg.brandl, giampaolo.rodola, hniksic, michael.foord, ncoghlan, piotr.dobrogost, pitrou, r.david.murray, rhettinger, vstinner
Date 2016-11-18.22:59:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479509940.36.0.119618555788.issue10049@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-11-18 22:59:00Martin Blaissetrecipients: + 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:00Martin Blaissetmessageid: <1479509940.36.0.119618555788.issue10049@psf.upfronthosting.co.za>
2016-11-18 22:59:00Martin Blaislinkissue10049 messages
2016-11-18 22:59:00Martin Blaiscreate