13 Sep
2010
13 Sep
'10
7:38 p.m.
Mark Dickinson <dickinsm@gmail.com> added the comment:
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) ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9802> _______________________________________