Changing pickle file for the same object

I put the object together, then do something with it, then detach it again and check that the object is still the same. This may not be the best way to ensure equality, but it is very strict and simple.

However, I am getting an unexpected difference in the pickle file on some machines running python2.7. I used pickletools to parse the resulting files.

The difference lies in the additional PUT code , although these registers are never available. When are PUT statements generated and why are they generated differently when pickle is called twice on the same object?

+3
python serialization pickle


source to share


No one has answered this question yet

Check out similar questions:

5116
How can I check if a file exists without exceptions?
3474
How to list all files in a directory?
2112
How do I copy a file in Python?
2028
How to read a file line by line in a list?
1848
Deleting a file or folder
1623
Determine the type of object?
1567
Converting form data to JavaScript object with jQuery
1441
How to find out if an object has an attribute in Python
873
Big data workflows using pandas
872
Deserialize JSON to dynamic C # object?



All Articles
Loading...
X
Show
Funny
Dev
Pics