diff options
author | Yury Selivanov <yury@magic.io> | 2018-11-20 14:12:57 -0500 |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2018-11-20 14:25:07 -0500 |
commit | 339d62fadafd0ab35a6394c2ad210b092704ce98 (patch) | |
tree | beefe165fa14198e9ffcba18a8f29d920496909b /immutables | |
parent | 1d813dd4ad80a1faa64844d96da45ba68396ddef (diff) | |
download | immutables-339d62fadafd0ab35a6394c2ad210b092704ce98.tar.gz immutables-339d62fadafd0ab35a6394c2ad210b092704ce98.zip |
Make MapMutation unpickleable
Diffstat (limited to 'immutables')
-rw-r--r-- | immutables/map.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/immutables/map.py b/immutables/map.py index 73581ed..fc40ac8 100644 --- a/immutables/map.py +++ b/immutables/map.py @@ -722,6 +722,9 @@ class MapMutation: def __len__(self): return self.__count + def __reduce__(self): + raise TypeError("can't pickle {} objects".format(type(self).__name__)) + def __hash__(self): raise TypeError('unhashable type: {}'.format(type(self).__name__)) |