Trouble sorting a list of objects by attributes
bthayre at physics.ucsd.edu
Fri Feb 6 17:08:30 EST 2009
On Feb 6, 1:03 pm, bearophileH... at lycos.com wrote:
> >then within each department block of the list, have it organized by projects.<
> I don't know what does it means.
> > timesheets.sort(key=operator.attrgetter('string'))
> Try something like:
> timesheets.sort(key=attrgetter("department", "engagement", "date",
> > My brain might explode if i continue.
Projects was meant to be engagements. All these suggestions are
great, let me see what i can make happen right now. Thanks all!
More information about the Python-list