bearophile wrote:
> Jérôme M. Berger:
>
>> Why didn't you write the second like this to keep it functional:
>> result2 = dict (map (lambda x: (x, x*x), xrange (20)))
>
> Because I've never seen people write it that way, and because for me it's
> less readable than the normal imperative code.
>
Oh, I agree that it's less readable, but wasn't that your point?
After all, the functional list generation with "map" is also less
readable than the corresponding imperative code.
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
signature.asc
Description: OpenPGP digital signature
