[Python-ideas] One more time... lambda function <--- from *** signature def.

Steven D'Aprano steve at pearwood.info
Tue Mar 4 16:19:59 CET 2014


On Tue, Mar 04, 2014 at 03:55:37PM +0100, Masklinn wrote:

> I don't agree with this, again why would the thunk be evaluated twice?
> If thunks are added to *delay* expression evaluation (which is what I
> understood from Steven's messages) surely something akin to Haskell's
> semantics is simpler to understand and implement. That is, instead
> of thunks being sugar for:
> 
>     bar = lambda: expr
> 
> they're sugar for
> 
>     bar = memoize(lambda: expr)

+1


-- 
Steven


More information about the Python-ideas mailing list