Robert Latest <boblatest at yahoo.com> writes: > flist.sort(key=File.mod_date.toordinal) > > However, Python says: > AttributeError: class File has no attribute 'mod_date' 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)