From 30c5030ebe8c6186a09237f51a60b997777c1a84 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 27 Jan 2010 06:05:24 +0000 Subject: [PATCH] A method for comparing person == person svn: r14146 --- src/gen/lib/person.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gen/lib/person.py b/src/gen/lib/person.py index 27d086e42..7a5e46c17 100644 --- a/src/gen/lib/person.py +++ b/src/gen/lib/person.py @@ -104,6 +104,9 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase, # We hold a reference to the GrampsDB so that we can maintain # its genderStats. It doesn't get set here, but from # GenderStats.count_person. + + def __eq__(self, other): + return isinstance(other, Person) and self.handle == other.handle def serialize(self): """