[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2009-12-07 Thread Tom Switzer
Tom Switzer thomas.swit...@gmail.com added the comment: If the equal min y-coords are handled, I think it'd be quicker too. As Guido noted, O(n) function calls is better then O(n log n) =] Though the general case is still unhandled. And, though it doesn't help my case, the Graham Scan can also

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2009-12-06 Thread Tom Switzer
Tom Switzer thomas.swit...@gmail.com added the comment: Mark: I think your example actually helps illustrate my point. My point was that computing the angle directly is less efficient or not as nice numerically. For instance, if you are sorting points by angle relative to an extreme point you

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2009-12-04 Thread Tom Switzer
Tom Switzer thomas.swit...@gmail.com added the comment: I am not sure I understand the reasoning behind removing the cmp parameter (and agree with Lea Wiemann). Trying to wedge a proper comparison into the key parameter is clumsy and unreadable (as can be seen in the 2to3 example above