Skip to content
Snippets Groups Projects
Commit 13a45fed authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Implement __eq__, __hash__ for CustomCodeNode

parent 2fe6cd6d
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,12 @@ class CustomCodeNode(Node): ...@@ -128,6 +128,12 @@ class CustomCodeNode(Node):
def undefined_symbols(self): def undefined_symbols(self):
return self._symbols_read - self._symbols_defined return self._symbols_read - self._symbols_defined
def __eq___(self, other):
return self._code == other._code
def __hash__(self):
return hash(self._code)
class PrintNode(CustomCodeNode): class PrintNode(CustomCodeNode):
# noinspection SpellCheckingInspection # noinspection SpellCheckingInspection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment