On 01.03.16 18:34, Ethan Furman wrote:
On 03/01/2016 03:14 AM, Serhiy Storchaka wrote:
The difference is that the copy module sets object's state before adding
items and key-value pairs, but the pickle module sets object's state
after adding items and key-value pairs. If append() or __setitem__(
On 03/01/2016 03:14 AM, Serhiy Storchaka wrote:
The difference is that the copy module sets object's state before adding
items and key-value pairs, but the pickle module sets object's state
after adding items and key-value pairs. If append() or __setitem__()
depend on the state of the object, th
The pickle and the copy modules use the same protocol. The reconstruct
the object by data returned by the __reduce_ex__/__reduce__ method, but
does it in different and incompatible way.
In general case the result of __reduce__ includes:
1) The class of the object and arguments to __new__().
2)