Antoine Pitrou <pit...@free.fr> added the comment:

> As an aside, I still like Jeffrey Yasskin's suggestion on the
> python-dev mailing list that the sensible definition for max would
> maintain the invariant that max(iterable) be equivalent to
> sorted(iterable)[-1]

What's interesting is the practical consequence that:

x, y = min(x, y), max(x, y)

cannot give you twice the same object.

Of course, there are subtle implications of how it will be implemented 
(especially with objects which have a partial order relationship to each 
other). Since max() is supposed to work on any iterator, we probably don't want 
to build an intermediate sequence and fetch elements in reverse order; instead 
perhaps use (not Py_LT) instead of Py_GT.

----------
nosy: +pitrou
versions: +Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9802>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to