[Tutor] sorting objects in lists by 2 attr

Alan Gauld alan.gauld at btinternet.com
Mon Jul 23 19:56:46 CEST 2007


"Philippe Niquille" <philippe at niquille.com> wrote

> The problem I now have, is that I lost the sorting order, as 
> described
> above. How would I resort it with a python algortithm instead of 
> SQL?

Why not use SQL? Best to get the highest quality data into your 
program
that you can, the earlier you clean it the better. Unless your 
database
is squealing and you need to move load onto your app server then I'd
leave the database to handle the data. In fact I might even make it a
stored procedure if the database supports those...

Alan G.





More information about the Tutor mailing list