Python's simplicity philosophy

David Eppstein eppstein at ics.uci.edu
Tue Nov 11 19:20:21 CET 2003


In article <lc4qxau8h7.fsf at gaffa.mit.edu>,
 Douglas Alan <nessus at mit.edu> wrote:

> "Dave Brueck" <dave at pythonapocrypha.com> writes:
> 
> > Part of the problem here is that just saying "only one way to do it" is a
> > horrible misquote, and one that unfortunately misses IMO some of the most
> > important parts of that "mantra":
> 
> Well, perhaps anything like "only one way to do it" should be removed
> from the mantra altogether, since people keep misquoting it in order
> to support their position of removing beautiful features like reduce()
> from the language.

I think the more relevant parts of the zen are:
Readability counts.
Although practicality beats purity.

The argument is that reduce is usually harder to read than the loops it 
replaces, and that practical examples of it other than sum are sparse 
enough that it is not worth keeping it just for the sake of 
functional-language purity.

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science




More information about the Python-list mailing list