Skip to content

Commit

Permalink
derived class shouldn't compare equal to base class
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Nov 15, 2023
1 parent 5db4596 commit 7fe5223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swig/edata.i
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __repr__(self):
return _edata_repr(self)

def __eq__(self, other):
return isinstance(other, self.__class__) and __eq__(self, other)
return other.__class__ == self.__class__ and __eq__(self, other)
%}
};
%extend std::unique_ptr<amici::ExpData> {
Expand Down

0 comments on commit 7fe5223

Please sign in to comment.