Nick Coghlan added the comment:

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.

----------
title: Add a "no-op" (null) context manager to contextlib -> Add a "no-op" 
(null) context manager to contextlib (Rejected: use contextlib.ExitStack())

_______________________________________
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