sorting with expensive compares?

Peter Otten __peter__ at web.de
Fri Dec 23 13:26:11 EST 2005


Dan Stromberg wrote:

> I'm wanting to sort a large number of files, like a bunch of output files
> from a large series of rsh or ssh outputs on a large series of distinct
> machines, a music collection in .ogg format (strictly redistributable and
> legally purchased music), a collection of .iso cdrom images (strictly
> redistributable and legally purchased software), and so forth.

Are you really trying to establish an order or do want to eliminate the
duplicates?

>>> File("perfectly_legal.ogg") < File("free_of_charge.mp3")
True

doesn't make that much sense to me, regardless of what the comparison may
actually do.

Peter




More information about the Python-list mailing list