This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients docs@python, jyasskin, mark.dickinson, mattheww, pitrou, rhettinger
Date 2010-09-12.12:52:37
SpamBayes Score 3.571366e-05
Marked as misclassified No
Message-id <1284295959.07.0.532242446739.issue9802@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2010-09-12 12:52:39pitrousetrecipients: + pitrou, rhettinger, mark.dickinson, mattheww, jyasskin, docs@python
2010-09-12 12:52:39pitrousetmessageid: <1284295959.07.0.532242446739.issue9802@psf.upfronthosting.co.za>
2010-09-12 12:52:37pitroulinkissue9802 messages
2010-09-12 12:52:37pitroucreate