Miki <[EMAIL PROTECTED]> writes:

> >   steps.sort(key = lambda s: s.time)
> This is why attrgetter in the operator module was invented.
> from operator import attrgetter
> ...
> steps.sort(key=attrgettr("time"))

Personally I prefer the anonymous function over attrgettr :)

 S.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to