Lambda going out of fashion

Jp Calderone exarkun at divmod.com
Thu Dec 23 19:43:29 CET 2004


On Thu, 23 Dec 2004 12:00:29 -0600, Skip Montanaro <skip at pobox.com> wrote:
>
>     >> While I'm sure it can be done, I'd hate to see a non-trivial Python
>     >> program written with lambda instead of def.
> 
>     Jp>   What, like this?
> 
>     Jp> (lambda r,p,b:...
> 
>     Jp>   OTOH, maybe that's still trivial, it's only a multiuser network
>     Jp>   chat server, after all.
> 
> You cheated by not rewriting Twisted using only lambda.  That's why I
> suggested pystone.  While it's a very small program, it is pretty much
> self-contained.
> 

  PyStones may be short (and be nearly lambda free!) but it is one opaque
blob to me.  I'd be hard pressed to rewrite it in any style, given its 
perverse use of global state.

  'course, I'll probably end up trying anyway.

  Jp



More information about the Python-list mailing list