Python's simplicity philosophy

Alex Martelli aleax at
Fri Nov 14 18:40:21 CET 2003

Douglas Alan wrote:
> How's that?  I've never used a programming language that has sum() in
> it.  (Or at least not that I was aware of.)  In fact, the *Python* I
> use doesn't even have sum() in it!  I've used a number of languages

Never used a modern Fortran?  Or never bothered to _learn_ it properly
"because it's a language for peasants"?-)

> that have reduce().  If I didn't already know that it exists, I
> wouldn't even think to look in the manual for a function that adds up
> a sequence of numbers, since such a function is so uncommon and
> special-purpose.

Right -- that's why the Fortran standard committee bothered to include
it, the Numeric Python designers bothered to define sum specifically
as an alias for add.reduce, and so on -- because it's so uncommon.

Indeed, that's why 'sum' is a commonly used word in English -- exactly
because nobody's every DOING anything like that -- while, of course,
'reduce' is totally obvious -- why, _anybody_ who's ever taken
Chemistry 101 knows it means "to remove oxygen"!


More information about the Python-list mailing list