From 56d4cdeb48b25df1f86bfcf8f8c1c89b1e6cdf9c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 6 Nov 2012 13:51:51 +0100 Subject: [PATCH] fhdl/structure: make all values hashable --- migen/fhdl/structure.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index fa97b793..f0ab2de8 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -109,6 +109,9 @@ class Value: def eq(self, r): return _Assign(self, r) + + def __hash__(self): + return id(self) class _Operator(Value): def __init__(self, op, operands): @@ -168,9 +171,6 @@ class Signal(Value): def __len__(self): return self.bv.width - def __hash__(self): - return id(self) - def __repr__(self): return "" -- 2.30.2