Why is this legal?

Alex Martelli aleaxit at yahoo.com
Thu Sep 9 10:19:27 CEST 2004


Michael George Lerner <mlerner at NOumichSPAM.edu> wrote:
   ...
> Heck, maybe I'll even download Python 2.4 so I can say
> cluster.sort(key=lambda c: c.resi)

Or better,
  cluster.sort(key=operator.attrgetter('resi'))

This way it will really fly!


Alex



More information about the Python-list mailing list