Python Tutorial Was: Guido's regrets: filter and map

François Pinard pinard at iro.umontreal.ca
Tue Nov 26 08:28:08 EST 2002


[Grant Edwards]

> In article <arsni0$pnk$1 at news.netpower.no>, David Brown wrote:

> >> I never liked filter, map and reduce.

> So don't use them. ;)

Some languages (think PL/I, some LISP implementations, and surely many
others) are full of constructs people do not use.  Each user has his/her
own preferred subset, and it often happens that a program written by
someone may not easily be read by someone else, without keeping the
language reference manual nearby.

I essentially learned Python with version 1.5.2, and it was still true
at the time that there was (about) only one way to do it, for most
"it".  This was a good guarantee towards legibility.  I'm now an happy
user of Python 2.2.1, in which there is now many ways to do many things.
I quite appreciate the novelties, they are often incredibly handsome.  Yet,
legibility (of others' programs) is getting impaired by the multiplicity.

To really maintain legibility in the long run, Python designers have to
consider they have to clean a bit behind.  Of course, "You do not like it,
so do not use it." conveys health and sanity.  But we have to stay aware
that this attitude might not be fully proper in the long run.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list