On Thu, Dec 09, 2004 at 03:22:29PM -0500, Kent Johnson wrote: > Using sort() with a user compare function is not recommended when you > care about performance. The problem is that the sort function has to > call back into Python code for every compare, of which there are many. > The decorate - sort - undecorate idiom is the preferred way to do this > in Python < 2.4. Python 2.4 adds the key= parameter to sort() and > does the DSU internally.
Karl, Kent, thanks for your prompt responses. I'm running python 2.3, and the DSU method performs nicely. Regards, Larry -- Larry Holish <[EMAIL PROTECTED]> _______________________________________________ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor