[Python-Dev] Behaviour of max() and min() with equal keys

Mark Dickinson dickinsm at gmail.com
Tue Sep 7 23:54:27 CEST 2010

On Tue, Sep 7, 2010 at 10:40 PM, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
> Decimal may actually have this backwards. The idea would be that
> min(*lst) == sorted(lst)[0], and max(*lst) == sorted(lst)[-1]. Given a
> stable sort, then, max of equivalent elements would return the last
> element, and min the first.

Yes, you're right; that would make more sense than the other way around.


More information about the Python-Dev mailing list