[Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore(). (original) (raw)
Georg Brandl g.brandl at gmx.net
Fri Oct 11 18:27:06 CEST 2013
- Previous message: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().
- Next message: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 11.10.2013 16:47, schrieb Barry Warsaw:
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.
Same here.
To bikeshed though: why was
ignored
changed toignore
? The former reads better to me, and I don't think that particular change was discussed at all in the tracker afaict.
Maybe to fit in with other verb-like APIs used as context managers: it's open() not opened().
Georg
- Previous message: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().
- Next message: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]