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

Steven D'Aprano steve at pearwood.info
Sun May 6 07:00:27 EDT 2018

On Thu, May 03, 2018 at 04:32:09PM +1000, Steven D'Aprano wrote:

> Maybe I'm slow today, but I'm having trouble seeing how to write this as 
> a lambda.

Yes, I was definitely having a "cannot brain, I have the dumb" day, 
because it is not that hard to write using lambda. See discussion here:


If anything, the problem is a plethora of choices, where it isn't clear 
which if any is the best way, or the One Obvious Way.


More information about the Python-ideas mailing list