Skip to content

Commit bdaee7d

Browse files
committed
redefines_eq_and_hash: optimization
1 parent 3986008 commit bdaee7d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Orange/data/util.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,4 @@ def redefines_eq_and_hash(this):
339339
if this.__hash__ is None:
340340
return False
341341

342-
for o in this.mro()[1:]:
343-
if this.__eq__ is o.__eq__ or this.__hash__ is o.__hash__:
344-
return False
345-
346-
return True
342+
return "__hash__" in this.__dict__ and "__eq__" in this.__dict__

0 commit comments

Comments
 (0)