[Python-Dev] Behaviour of max() and min() with equal keys (original) (raw)
Hrvoje Niksic hrvoje.niksic at avl.com
Wed Sep 8 10:48:34 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 09/07/2010 11:40 PM, Jeffrey Yasskin wrote:
Decimal may actually have this backwards. The idea would be that min(*lst) == sorted(lst)[0], and max(*lst) == sorted(lst)[-1].
Here you mean "is" rather than "==", right? The relations you spelled are guaranteed regardless of stability.
(This doesn't apply to Decimal.max and Decimal.min, which return new objects.)
- 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 ]