Skip to content

Commit

Permalink
Updated __eq__ and __ne__ method of LNode (#636)
Browse files Browse the repository at this point in the history
Signed-off-by: fazledyn-or <ataf@openrefactory.com>
  • Loading branch information
fazledyn-or committed Nov 15, 2023
1 parent dfc6a7c commit ff7fcf6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ffcx/codegeneration/lnodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,10 @@ class LNode(object):
"""Base class for all AST nodes."""

def __eq__(self, other):
name = self.__class__.__name__
raise NotImplementedError("Missing implementation of __eq__ in " + name)
return NotImplemented

def __ne__(self, other):
return not self.__eq__(other)
return NotImplemented


class LExpr(LNode):
Expand Down

0 comments on commit ff7fcf6

Please sign in to comment.