[Python-ideas] Add "default" kw argument to operator.itemgetter and operator.attrgetter

Serhiy Storchaka storchaka at gmail.com
Thu May 3 05:06:46 EDT 2018


03.05.18 08:28, Raymond Hettinger пише:
>> On May 2, 2018, at 1:08 AM, Vincent Maillol <vincent.maillol at gmail.com> wrote:
>>
>> Our PEP idea would be to purpose to add a global default value for
>> itemgeet and attrgetter method.
> 
> My preference is to not grow that API further.  It is creep well beyond its intended uses.  At some point, we're really better off just using a lambda.

+1



More information about the Python-ideas mailing list