Skip to content

Commit 502f94b

Browse files
committed
__eq__() method for dtypes._Node
1 parent 7060934 commit 502f94b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

veriloggen/dataflow/dtypes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def __init__(self):
103103

104104
def __hash__(self):
105105
return hash((id(self), self.object_id))
106+
107+
def __eq__(self, other):
108+
return (id(self), self.object_id) == (id(other), other.object_id)
106109

107110
#-------------------------------------------------------------------------------
108111
class _Numeric(_Node):

0 commit comments

Comments
 (0)