On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote: > PS: If you are sorting files by size and checksum as part of a deduplication > effort consider using dict-s instead:
Yeah, I'd agree if that's the purpose. But let's say the point is to have a guaranteed-stable ordering of files that are primarily to be sorted by file size - in order to ensure that two files are in the same order every time you refresh the view, they get sorted by their checksums. There ARE good reasons to do weird things with sorting, and a custom key object (either with cmp_to_key or directly implemented) can do that. ChrisA -- https://mail.python.org/mailman/listinfo/python-list