According to this post What is a fast pythonic way to deepcopy just data from a python dict or list ? msgpack is 10 times faster than copy.deepcopy
but I cannot figure out how to use it.
I tried
item2 = msgpack.unpack(msgpack.packb(item1))
In place of:
item2 = copy.deepcopy(item1)
But I get
File "msgpack/_unpacker.pyx", line 228, in msgpack._unpacker.unpack
AttributeError: 'bytes' object has no attribute 'read'
The documentation located here http://msgpack-python.readthedocs.io/en/latest/api.html is incomprehensible but that's no surprise because just about all computer documentation is incomprehensible to me.