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 ncoghlan
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-19.03:17:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479525468.9.0.883287276078.issue10049@psf.upfronthosting.co.za>
In-reply-to
Content
The problem Martin is referring to is the SEO one, which is that the top link when searching for either "null context manager python" or "no-op context manager python" is this thread, rather than the "Use ExitStack for that" recipe in the docs: https://docs.python.org/3/library/contextlib.html#simplifying-support-for-single-optional-context-managers

We unfortunately have exactly zero SEO experts working on the CPython documentation, so even when we provide specific recipes in the docs for solving particular problems, they aren't always easy for people to find.

I've at least added the "use contextlib.ExitStack()" note to the issue title here, so folks can find that without having to read through the whole comment thread.
History
Date User Action Args
2016-11-19 03:17:49ncoghlansetrecipients: + ncoghlan, georg.brandl, rhettinger, pitrou, vstinner, giampaolo.rodola, hniksic, eric.araujo, r.david.murray, michael.foord, daniel.urban, piotr.dobrogost, Alexander.Jones, DLitz, Martin Blais
2016-11-19 03:17:48ncoghlansetmessageid: <1479525468.9.0.883287276078.issue10049@psf.upfronthosting.co.za>
2016-11-19 03:17:48ncoghlanlinkissue10049 messages
2016-11-19 03:17:48ncoghlancreate