This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients docs@python, jyasskin, mark.dickinson, mattheww, pitrou, rhettinger
Date 2010-09-13.19:37:57
SpamBayes Score 0.017661288
Marked as misclassified No
Message-id <1284406680.29.0.770071846012.issue9802@psf.upfronthosting.co.za>
In-reply-to
Content
> Of course, there are subtle implications of how it will be implemented

Indeed.  Ideally, as you mention, the implementation would only use __lt__ (as with sort and bisect).  I think that constraint only leaves one reasonable choice: namely, max and min for multiple args would be functionally equivalent to max_list and min_list below:

def min2(x, y):
    return y if y < x else x

def max2(x, y):
    return x if y < x else y

def min_list(xs):
    return reduce(min2, xs)

def max_list(xs):
    return reduce(max2, xs)
History
Date User Action Args
2010-09-13 19:38:00mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, pitrou, mattheww, jyasskin, docs@python
2010-09-13 19:38:00mark.dickinsonsetmessageid: <1284406680.29.0.770071846012.issue9802@psf.upfronthosting.co.za>
2010-09-13 19:37:57mark.dickinsonlinkissue9802 messages
2010-09-13 19:37:57mark.dickinsoncreate