[Python-ideas] Make max() stable

Stephen J. Turnbull stephen at xemacs.org
Sat Jan 18 08:24:43 CET 2014


Andrew Barnert writes:

 > No, a list is a multiset _with order_. Which is the whole
 > point. You claimed that because it's a multiset, the order doesn't
 > matter. But because the domain of max is a sequence (or, better, as
 > you correctly point out, an iterable), not a multiset, the order
 > does matter. Otherwise this entire question wouldn't arise in the
 > first place.

Iterables need not have order in a sense that allows definition of
"stability".  That's why things like OrderedDict are necessary.



More information about the Python-ideas mailing list