Paul Rubin wrote: > The attribute is on instances of File, not on the class itself. See > if this works: > > flist.sort(key=lambda f: f.mod_date.toordinal)
It doesn't throw an error any more, but neither does it sort the list. This, however, works: ---------------------- def by_date(f1, f2): return f1.mod_date.toordinal() - f2.mod_date.toordinal() flist.sort(by_date) ---------------------- So I'm sticking with it, although I sort of liked the key approach. robert -- http://mail.python.org/mailman/listinfo/python-list