Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread Nick Coghlan
On Tue, Nov 2, 2010 at 2:26 AM, Michael Foord wrote: > On 01/11/2010 16:23, Nick Coghlan wrote: >> Looking at assertItemsEqual, I'd be inclined to insert a check that >> falls back to the "unorderable_list_difference" approach in the case >> where "expected != sorted(reversed(expected))" > > If th

Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread Michael Foord
On 01/11/2010 16:23, Nick Coghlan wrote: On Tue, Nov 2, 2010 at 1:33 AM, R. David Murray wrote: Or, to put it another way, *if* there is a bug here it would be in set, not sorted. Put me in the "it's not a bug, it's a feature" camp. Providing a "elements equal" check that doesn't rely on LT pr

Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread Nick Coghlan
On Tue, Nov 2, 2010 at 1:33 AM, R. David Murray wrote: > Or, to put it another way, *if* there is a bug here it would be in set, > not sorted. Put me in the "it's not a bug, it's a feature" camp. Providing a "elements equal" check that doesn't rely on LT providing a total ordering is a non-trivia

Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread R. David Murray
On Mon, 01 Nov 2010 15:14:36 -, Michael Foord wrote: > On 01/11/2010 15:10, R. David Murray wrote: > > On Mon, 01 Nov 2010 14:26:19 -, Michael > > Foord wrote: > >> Well, bug is the wrong word as it is obviously an intended feature (or > >> consequence of a feature). I still think, give

Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread Michael Foord
On 01/11/2010 15:10, R. David Murray wrote: On Mon, 01 Nov 2010 14:26:19 -, Michael Foord wrote: On 01/11/2010 11:33, Antoine Pitrou wrote: On Mon, 01 Nov 2010 02:55:35 + Michael Foord wrote: Having a more efficient 'slow-path' and moving to that by default would fix it. The bug is

Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread R. David Murray
On Mon, 01 Nov 2010 14:26:19 -, Michael Foord wrote: > On 01/11/2010 11:33, Antoine Pitrou wrote: > > On Mon, 01 Nov 2010 02:55:35 + > > Michael Foord wrote: > >> Having a more efficient 'slow-path' and moving to that by default would > >> fix it. The bug is only a duplicate of the bug i

Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread Michael Foord
On 01/11/2010 11:33, Antoine Pitrou wrote: On Mon, 01 Nov 2010 02:55:35 + Michael Foord wrote: Having a more efficient 'slow-path' and moving to that by default would fix it. The bug is only a duplicate of the bug in sorted - caused by the fact that sets / frozensets can't be sorted in the

Re: [Python-Dev] Stable sort and partial order

2010-11-01 Thread R. David Murray
On Mon, 01 Nov 2010 12:33:31 +0100, Antoine Pitrou wrote: > On Mon, 01 Nov 2010 02:55:35 + > Michael Foord wrote: > > Having a more efficient 'slow-path' and moving to that by default would > > fix it. The bug is only a duplicate of the bug in sorted - caused by the > > fact that sets / fro