Re: builtin max() and weak ordering

2011-03-03 Thread Mark Dickinson
On Mar 3, 10:38 am, Stephen Evans wrote: > The CPython builtins min() and max() both return the first satisfactory > object found. This behaviour is undocumented. Examining the source in > bltinmodule.c shows that min() and max() both result in a call to min_max() > with Py_LT and Py_GT passed

builtin max() and weak ordering

2011-03-03 Thread Stephen Evans
The CPython builtins min() and max() both return the first satisfactory object found. This behaviour is undocumented. Examining the source in bltinmodule.c shows that min() and max() both result in a call to min_max() with Py_LT and Py_GT passed respectively. The behaviour of min() is correct.