A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-October/129384.html below:

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

[Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore(). [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().Victor Stinner victor.stinner at gmail.com
Fri Oct 11 11:43:31 CEST 2013
[We are discussing issue #15806.]

2013/10/11 Antoine Pitrou <solipsis at pitrou.net>:
> I don't think that this contextlib.ignore() thing has been discussed a
> lot.

If we decide to keep the feature, I would prefer a less generic name:
contextlib.ignore_excep(), contextlib.ignore_exception() or
contextlib.ignore_exceptions().

> 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.

The purpose of the new context manager is to reduce the number of line
of code? It goes a little bit against a Zen Principle:

    There should be one-- and preferably only one --obvious way to do it.

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4