diff options
author | Casey Dahlin <cdahlin@redhat.com> | 2008-12-23 00:18:54 -0500 |
---|---|---|
committer | Casey Dahlin <cdahlin@redhat.com> | 2008-12-23 00:18:54 -0500 |
commit | 456d6679048b1508717159c35d80b38bbc351b7f (patch) | |
tree | 58a41c0064df78e376874d1b25e997f6c776f856 | |
parent | 9de921a15e814d992fa06d29a11c47e9f8aa6ff1 (diff) | |
download | upstate-456d6679048b1508717159c35d80b38bbc351b7f.tar.gz upstate-456d6679048b1508717159c35d80b38bbc351b7f.tar.xz upstate-456d6679048b1508717159c35d80b38bbc351b7f.zip |
Make __eq__ consider the class of the other object
-rw-r--r-- | category.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/category.py b/category.py index 857ef2b..a5f0d6b 100644 --- a/category.py +++ b/category.py @@ -95,6 +95,8 @@ class Category: return hash((self.argstup(), self.name)) def __eq__(self, other): + if not other.__class__ == Category: + return False return self.name == other.name and self.argstup() == other.argstup() def argstup(self): |