Re: Python's simplicity philosophy
"Alex Martelli" <aleax@aleax.it > wrote in message
news:%N8tb.2827 7$hV.1041253@ne ws2.tin.it...[color=blue]
> to be consistent with your other arguments, no doubt you'd argue for
> a .sort() followed by [-1] as "more general" than max...[/color]
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
"Alex Martelli" <aleax@aleax.it > wrote in message
news:%N8tb.2827 7$hV.1041253@ne ws2.tin.it...[color=blue]
> to be consistent with your other arguments, no doubt you'd argue for
> a .sort() followed by [-1] as "more general" than max...[/color]
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
Comment