Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions umsgpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ def __str__(self):
s += ")"
return s

def __hash__(self):
"""
Allow to hash extensions, thus allowing them as map keys.
"""
return hash((self.type, self.data))


class InvalidString(bytes):
"""Subclass of bytes to hold invalid UTF-8 strings."""
pass
Expand Down