I sing the praises of lambda, my friend and savior!

gabriele renzi rff_rff at remove-yahoo.it
Mon Oct 11 20:18:34 CEST 2004


Steven Bethard ha scritto:


> While I totally agree with the Ewww here, I think the point was to have full-
> fledged anonymous functions, instead of lambdas, which are restricted to a 
> single expression.  Of course, the syntax chosen for this is (to some degree, 
> at least) arbitrary, but the idea would be to allow things like:
> 
> func(arg1, lambda arg2:
>                self.update(arg2)
>                return arg2*2)
> 
> My understanding is that no one's ever found an anonymous def syntax that 
> everyone really likes, so I suspect the argument will continue to be "too ugly 
> for too little gain in coding ease".  

join the forces of those who asks blocks :)
I'd like
  do a,b:
	indentblock




More information about the Python-list mailing list