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

2011-03-04 Thread Stephen Evans
Stephen Evans 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 of Programming. Addison

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

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: As discussed with Mark, am closing this one after having applied documentation changes. -- resolution: -> rejected status: open -> closed ___ Python tracker __

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

2010-09-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Documented the current behavior in r84822. Mark, if you're free on IRC at some point, I would like to discuss further. -- ___ Python tracker ___

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

2010-09-13 Thread Mark Dickinson
Mark Dickinson 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: namely, max and min for

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

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

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

2010-09-12 Thread Matthew Woodcraft
Matthew Woodcraft 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 what the point of the

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

2010-09-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: d...@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

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

2010-09-08 Thread Mark Dickinson
Mark Dickinson 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 the point of the

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

2010-09-08 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : 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 this a documented guara