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:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr
signature.asc
Description: OpenPGP digital signature