File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -56,19 +56,6 @@ files.
5656
5757The :mod: `pickle ` module differs from :mod: `marshal ` in several significant ways:
5858
59- * The :mod: `pickle ` module keeps track of the objects it has already serialized,
60- so that later references to the same object won't be serialized again.
61- :mod: `marshal ` doesn't do this.
62-
63- This has implications both for recursive objects and object sharing. Recursive
64- objects are objects that contain references to themselves. These are not
65- handled by marshal, and in fact, attempting to marshal recursive objects will
66- crash your Python interpreter. Object sharing happens when there are multiple
67- references to the same object in different places in the object hierarchy being
68- serialized. :mod: `pickle ` stores such objects only once, and ensures that all
69- other references point to the master copy. Shared objects remain shared, which
70- can be very important for mutable objects.
71-
7259* :mod: `marshal ` cannot be used to serialize user-defined classes and their
7360 instances. :mod: `pickle ` can save and restore class instances transparently,
7461 however the class definition must be importable and live in the same module as
You can’t perform that action at this time.
0 commit comments