[Python-ideas] Add "default" keyword to itemgetter and attrgetter

Stefan Behnel stefan_ml at behnel.de
Fri Mar 23 19:08:00 CET 2012


Miki Tebeka, 23.03.2012 18:56:
> I apologize if this appears twice, Google groups gave me an error on
> the first one and I want to make sure this makes it through.
> 
> Repeating http://bugs.python.org/​issue14384 ....
> 
> This way they will behave more like getattr and the dictionary get.

Note that this has been discussed before. Look for a thread titled
"defaultattrgetter".

Stefan




More information about the Python-ideas mailing list