How to write this as a list comprehension?

Piet van Oostrum piet at vanoostrum.org
Sat Jan 18 12:40:22 EST 2014


Alain Ketterlin <alain at dpt-info.u-strasbg.fr> writes:

> Piet van Oostrum <piet at vanoostrum.org> writes:
> [...]
>> Python misses a 'where' or 'let'-like construction as in Haskell.
>
> "let x = v in e" really is (lambda x:e)(v)
>
You are right, but it is a lot less readable IMHO.
-- 
Piet van Oostrum <piet at vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]



More information about the Python-list mailing list