[Python-Dev] Behaviour of max() and min() with equal keys (original) (raw)
Mark Dickinson dickinsm at gmail.com
Tue Sep 7 23:54:27 CEST 2010
- Previous message: [Python-Dev] Behaviour of max() and min() with equal keys
- Next message: [Python-Dev] Behaviour of max() and min() with equal keys
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
Mark
- Previous message: [Python-Dev] Behaviour of max() and min() with equal keys
- Next message: [Python-Dev] Behaviour of max() and min() with equal keys
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]