[Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

Barry Warsaw barry at python.org
Fri Oct 11 16:47:23 CEST 2013


On Oct 11, 2013, at 09:24 AM, Antoine Pitrou wrote:

>I don't think that this contextlib.ignore() thing has been discussed a
>lot.
>
>Ezio was -1 on the tracker, and Eric Smith was -0. I'd like to add my
>-1 too. This is a useless addition (the traditional idiom is perfectly
>obvious) and makes reading foreign code more tedious by adding
>superfluous API calls.
>
>Please consider reverting.  There is absolutely zero use case for this
>that wasn't already solved by the traditional "except ...: pass" idiom.

I'm +0; I think it's a nice little addition that could be useful, but I don't
care enough to wait for 3.4 to delete similar code in a my own programs.

To bikeshed though: why was `ignored` changed to `ignore`?  The former reads
better to me, and I don't think *that* particular change was discussed at all
in the tracker afaict.

-Barry


More information about the Python-Dev mailing list