[We are discussing issue #15806.]
2013/10/11 Antoine Pitrou <[email protected]>:
> 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
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com