If you are lambda-phobic (as I am) this should also work for an arbitrary set of attributes:
attrs = 'attr1 attr2 attr3'.split() sortlist = [[getattr(o,a) for a in attrs] + [o] for o in objects] sorted_objects = [x[-1] for x in sorted(sortlist)] -Noah -- http://mail.python.org/mailman/listinfo/python-list