[Python-Dev] Use an empty def as a lambda
joe.pinsonault at gmail.com
Thu Sep 19 23:00:07 CEST 2013
I think it's a great idea personally. It's explicit and obvious. "lamda" is
too computer sciencey
On Sep 19, 2013 1:55 PM, "Ben Gift" <benhgift at gmail.com> wrote:
> I think the lambda keyword is difficult to understand for many people. It
> would be more pythonic to use an empty def call instead.
> For instance this:
> words.sort(key = lambda x: x)
> could look like this:
> words.sort(key = def (x): x)
> It's obvious and explicit that we're creating an unnamed, anonymous
> function this way.
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev