Mercurial > magic
view functools.total_ordering @ 244:eee52d5a4af8 default tip
created
| author | 127.0.0.1 |
|---|---|
| date | Sun, 30 Jun 2013 11:08:33 +0200 |
| parents | feaebfdde7fa |
| children |
line wrap: on
line source
{{{#!python @functools.total_ordering class Student: def __eq__(self, other): return ((self.lastname.lower(), self.firstname.lower()) == (other.lastname.lower(), other.firstname.lower())) def __lt__(self, other): return ((self.lastname.lower(), self.firstname.lower()) < (other.lastname.lower(), other.firstname.lower())) }}}
