Skip to content

Commit d19fdf2

Browse files
add __hash__ to Multiaddr
1 parent c57fb9b commit d19fdf2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

multiaddr/multiaddr.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ def __str__(self):
170170
def __repr__(self):
171171
return "<Multiaddr %s>" % str(self)
172172

173+
def __hash__(self):
174+
return self._bytes.__hash__()
175+
173176
def to_bytes(self):
174177
"""Returns the byte array representation of this Multiaddr."""
175178
return self._bytes

0 commit comments

Comments
 (0)