From c3db22368aa1d0df144a122ca26f749299b240d3 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Tue, 29 Nov 2016 11:51:10 +0100 Subject: [PATCH] Remove MultiAssignmentBase.__eq__ It does not do something fundamentally different than Record.__eq__ and its definition deletes the implementation of __hash__ in python3. --- loopy/kernel/instruction.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/loopy/kernel/instruction.py b/loopy/kernel/instruction.py index 9e1ef233c..93642103e 100644 --- a/loopy/kernel/instruction.py +++ b/loopy/kernel/instruction.py @@ -407,19 +407,6 @@ class InstructionBase(ImmutableRecord): # {{{ comparison, hashing - def __eq__(self, other): - if not type(self) == type(other): - return False - - for field_name in self.fields: - if getattr(self, field_name) != getattr(other, field_name): - return False - - return True - - def __ne__(self, other): - return not self.__eq__(other) - def update_persistent_hash(self, key_hash, key_builder): """Custom hash computation function for use with :class:`pytools.persistent_dict.PersistentDict`. -- GitLab