Skip to content

Commit 70896ab

Browse files
committed
lib.wiring: make FlippedInterface hashable
1 parent 3c3dffa commit 70896ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

amaranth/lib/wiring.py

+3
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,9 @@ def __eq__(self, other):
12771277
"""
12781278
return type(self) is type(other) and self.__unflipped == other.__unflipped
12791279

1280+
def __hash__(self):
1281+
return hash(self.__unflipped)
1282+
12801283
# See the note in `FlippedSignature`. In addition, these accessors also handle flipping of
12811284
# an interface member.
12821285

0 commit comments

Comments
 (0)