e.g., for a python dict like:
a = {(1, 2): 3}
it is ok to do umsgpack.pack(a), but get UnhashableKeyException when doing unpack.
The cause is when packing, tuples become lists, but lists can't be a dict key.
But we can safely assume when we see a list as a dict key, it was a tuple at the moment it was serialized. So maybe we can just do
if isinstance(k, list):
k = tuple(k)
and then all the checkings (around line 549)
e.g., for a python dict like:
a = {(1, 2): 3}
it is ok to do umsgpack.pack(a), but get UnhashableKeyException when doing unpack.
The cause is when packing, tuples become lists, but lists can't be a dict key.
But we can safely assume when we see a list as a dict key, it was a tuple at the moment it was serialized. So maybe we can just do
if isinstance(k, list):
k = tuple(k)
and then all the checkings (around line 549)