I'm sure my avoidance of lambdas as due as much to laziness as adherence to principle. This is a good opportunity to learn about them.
I suggested the above because it wasn't obvious to me how one would pass the arbitrary set of attributes to the lambda expression (and I envisioned them being specified as strings in this case, since the set of attributes will be coming from a web form). So what about the following (attrgetter aside)? attrs = 'attr1 attr2 attr3'.split() L.sort(key=lambda i: [getattr(i,a) for a in attrs]) -Noah -- http://mail.python.org/mailman/listinfo/python-list