summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-30 15:58:36 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-30 15:58:36 -0700
commit59d9b15711522469674c5af3e838e26a9dcde805 (patch)
treeb62cd7938a101c6f9b3bc964fb5c48575dee267b /pym
parent2fcfc8ede6cc09aa6f16cea1d732bf669912b28b (diff)
downloadportage-59d9b15711522469674c5af3e838e26a9dcde805.tar.gz
portage-59d9b15711522469674c5af3e838e26a9dcde805.tar.bz2
portage-59d9b15711522469674c5af3e838e26a9dcde805.zip
Simplify Task.__eq__() and __ne__().
Supposedly performance it better with the simpler implementation. This reverts commit 59f50a0bf9bdbb3aab4eee097e12bf32eeb12274.
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/Task.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/pym/_emerge/Task.py b/pym/_emerge/Task.py
index dfb560f6a..31788b576 100644
--- a/pym/_emerge/Task.py
+++ b/pym/_emerge/Task.py
@@ -12,14 +12,10 @@ class Task(SlotObject):
raise NotImplementedError(self)
def __eq__(self, other):
- if self.__class__ is not other.__class__:
- return False
- return self._get_hash_key() == other._get_hash_key()
+ return self._get_hash_key() == other
def __ne__(self, other):
- if self.__class__ is not other.__class__:
- return True
- return self._get_hash_key() != other._get_hash_key()
+ return self._get_hash_key() != other
def __hash__(self):
hash_value = getattr(self, "_hash_value", None)