Python's simplicity philosophy

Terry Reedy tjreedy at udel.edu
Fri Nov 14 17:55:34 EST 2003


"Alex Martelli" <aleax at aleax.it> wrote in message
news:%N8tb.28277$hV.1041253 at news2.tin.it...
> to be consistent with your other arguments, no doubt you'd argue for
> a .sort() followed by [-1] as "more general" than max...

By my definition of "more general", a function that returns all order
statistics of a list is trivially more general than one that returns
any fewer, including just one.  It conveys a superset of the
infomation conveyed by less general functions and answers a superset
of the questions they answer.  If you add a control parameter
specifying which order statistics to return, then less general
functions have a restriced domain.

So I have no idea your intent in appearing to challenge this and how
you think it contributes to your overall argument.  Is your idea of
'more general' so different?

Terry J. Reedy







More information about the Python-list mailing list