[issue9802] Document 'stability' of builtin min() and max()

2011-03-04 Thread Stephen Evans
Stephen Evans step...@recombinant.co.uk added the comment: As suggested by Mark following my post on comp.lang.python I am adding further comments to the discussion on this (closed) issue. For a more mathematical consideration of the issue: Stepanov, Alexander and Paul McJones. 2009. Elements

[issue9802] Document 'stability' of builtin min() and max()

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: As discussed with Mark, am closing this one after having applied documentation changes. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue9802] Document 'stability' of builtin min() and max()

2010-09-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Of course, there are subtle implications of how it will be implemented Indeed. Ideally, as you mention, the implementation would only use __lt__ (as with sort and bisect). I think that constraint only leaves one reasonable choice:

[issue9802] Document 'stability' of builtin min() and max()

2010-09-12 Thread Matthew Woodcraft
Matthew Woodcraft matt...@woodcraft.me.uk added the comment: (1) Shouldn't 'reverse=True' be omitted in the second doc addition? Yes, of course, sorry. (2) I'd also suggest adding a brief comment about what this means for distinct, but equal, objects; otherwise it's not really obvious

[issue9802] Document 'stability' of builtin min() and max()

2010-09-12 Thread Antoine Pitrou
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

[issue9802] Document 'stability' of builtin min() and max()

2010-09-08 Thread Matthew Woodcraft
New submission from Matthew Woodcraft matt...@woodcraft.me.uk: In CPython, the builtin max() and min() have the property that if there are items with equal keys, the first item is returned. From a quick look at their source, I think this is true for Jython and IronPython too. I propose making

[issue9802] Document 'stability' of builtin min() and max()

2010-09-08 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the patch! Comments: (1) Shouldn't 'reverse=True' be omitted in the second doc addition? (2) I'd also suggest adding a brief comment about what this means for distinct, but equal, objects; otherwise it's not really obvious what

[issue9802] Document 'stability' of builtin min() and max()

2010-09-08 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: d...@python - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9802 ___