[Python-ideas] Making min and max behave more like any and all
Masklinn
masklinn at masklinn.net
Wed Nov 30 19:22:19 CET 2011
On 2011-11-30, at 19:15 , Guido van Rossum wrote:
>> In the first case this becomes illegal
>> max(1,2,3,4,5)
>>
>
> Which I presume is rarely needed but if necessary can easily be written as
> max((1, 2, 3, 4, 5)).
The *args form is rather nice for the (pretty common I'd think) task of min/maxing a pair of values, one know (default) and one unknown for instance.
It is also a common interface for min/max functions.
More information about the Python-ideas
mailing list