X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/a2f8ee881d66601e9cb714069dc88d3ed9703db6..0fd2ed230ea6d53adb5e627731672c996485167b:/librarian/dcparser.py diff --git a/librarian/dcparser.py b/librarian/dcparser.py index 49a33d4..e2f91a0 100644 --- a/librarian/dcparser.py +++ b/librarian/dcparser.py @@ -44,6 +44,11 @@ class Person(object): def __eq__(self, right): return self.last_name == right.last_name and self.first_names == right.first_names + def __cmp__(self, other): + return cmp((self.last_name, self.first_names), (other.last_name, other.first_names)) + + def __hash__(self): + return hash((self.last_name, self.first_names)) def __unicode__(self): if len(self.first_names) > 0: