This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients abacabadabacaba, josh.r, rhettinger
Date 2015-10-28.03:31:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446003062.54.0.0390266700286.issue25454@psf.upfronthosting.co.za>
In-reply-to
Content
I would rather leave lambda or plain function definitions as the way to handle any cases not covered by itergetter, attrgettr, and methodcaller.   It feels like we're working way too hard to produce more ways to do it.   

Also, the suggested use cases with all() and map() would likely be expressed more cleanly (and readably) with a list comprehension.  The reduce() example isn't clear at all (that is part of the reason it was banished to the functools module).  I would not want to encounter any of the examples during a debugging session.

I think we should decline this feature request as being "a bridge too far" and not what the zen-of-python would encourage us to do.  I can't think of any existing code that would be improved by the availability of this extension.  Instead, we ought to focus on making the core language as expressive as possible.
History
Date User Action Args
2015-10-28 03:31:02rhettingersetrecipients: + rhettinger, abacabadabacaba, josh.r
2015-10-28 03:31:02rhettingersetmessageid: <1446003062.54.0.0390266700286.issue25454@psf.upfronthosting.co.za>
2015-10-28 03:31:02rhettingerlinkissue25454 messages
2015-10-28 03:31:00rhettingercreate