Re: comparing Model instances

2008-09-11 Thread Eric Abrahamsen
On Sep 12, 2008, at 6:05 AM, Malcolm Tredinnick wrote: > > > On Thu, 2008-09-11 at 17:27 -0400, Steve Holden wrote: > [...] >> I've got some timings lying around somewhere that clearly show the >> decorate/sort/undecorate implementation is way faster under normal >> circumstances. > > True. That

Re: comparing Model instances

2008-09-11 Thread Malcolm Tredinnick
On Thu, 2008-09-11 at 17:27 -0400, Steve Holden wrote: [...] > I've got some timings lying around somewhere that clearly show the > decorate/sort/undecorate implementation is way faster under normal > circumstances. True. That's a very important point. Even in the good old days before sort() dev

Re: comparing Model instances

2008-09-11 Thread Steve Holden
Malcolm Tredinnick wrote: > > On Thu, 2008-09-11 at 15:36 +0800, Eric Abrahamsen wrote: >> I'm fooling around with comparing instances of different models, >> trying to make a unified stream of instances that can be sorted by >> date according to a certain datetime attribute on each model. I

Re: comparing Model instances

2008-09-11 Thread Malcolm Tredinnick
On Thu, 2008-09-11 at 15:36 +0800, Eric Abrahamsen wrote: > I'm fooling around with comparing instances of different models, > trying to make a unified stream of instances that can be sorted by > date according to a certain datetime attribute on each model. I > thought I'd define a __cmp__

comparing Model instances

2008-09-11 Thread Eric Abrahamsen
I'm fooling around with comparing instances of different models, trying to make a unified stream of instances that can be sorted by date according to a certain datetime attribute on each model. I thought I'd define a __cmp__ method on each model in question, that would provide the appropri