lambdak: multi-line lambda implementation in native Python

Rick Johnson rantingrickjohnson at gmail.com
Fri Jan 16 04:06:21 CET 2015


On Wednesday, January 14, 2015 at 11:55:11 PM UTC-6, Yawar Amin wrote:
> First off, to each reader--if you believe that 'multi-
> line' lambdas are no good and we can just use functions,
> decorators, &c. to accomplish everything in Python,
> advance warning: this post will annoy you.

Well i'm not religious in that way, but i can tell you that
you'd be hard pressed to find a subject that did *NOT*
annoy someone in this group. Heck, it might even be
something like finding a "holy grail" if we all agreed!

> Now, the crux of my message. I have implemented what I
> believe is a fairly robust, if ugly-looking, native Python
> module made up of combinator functions which compose
> together to form function expressions (well, callable
> expressions).

Oh my, that's atrocious! (but kudos for trying!). If you
have not already done so, i would suggest you play around
with the Ruby language -- for which anonymous blocks are
quite prevalent.

I myself have lamented the limited power and expressiveness
of Python's anonymous functions. It's almost as though
Python lambda's are barely worth having since they are so
crippled.

Of course the majority will say "that is because people
would use them for stupid things"... well, i've seen Python
used for stupid things -- how are they going to reconcile
that?. These types of excuses are based purely on religious
or fascist thinking, and nothing more. :-(





More information about the Python-list mailing list