File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -687,15 +687,15 @@ <h2 id=pickle>Classes That Can Be Serialized</h2>
687
687
< td > a custom object deepcopy
688
688
< td > < code class =pp > copy.deepcopy(x)</ code >
689
689
< td > < a href =http://docs.python.org/3.1/library/copy.html > < code > x.< dfn > __deepcopy__</ dfn > ()</ code > </ a >
690
- < tr > < th >
690
+ < tr > < th > *
691
691
< td > to get an object’s state before pickling
692
692
< td > < code class =pp > pickle.dump(x, < var > file</ var > )</ code >
693
693
< td > < a href =http://docs.python.org/3.1/library/pickle.html#pickle-state > < code > x.< dfn > __getstate__</ dfn > ()</ code > </ a >
694
- < tr > < th >
694
+ < tr > < th > *
695
695
< td > to serialize an object
696
696
< td > < code class =pp > pickle.dump(x, < var > file</ var > )</ code >
697
697
< td > < a href =http://docs.python.org/3.1/library/pickle.html#pickling-class-instances > < code > x.< dfn > __reduce__</ dfn > ()</ code > </ a >
698
- < tr > < th >
698
+ < tr > < th > *
699
699
< td > to serialize an object (new pickling protocol)
700
700
< td > < code class =pp > pickle.dump(x, < var > file</ var > , < var > protocol_version</ var > )</ code >
701
701
< td > < a href =http://docs.python.org/3.1/library/pickle.html#pickling-class-instances > < code > x.< dfn > __reduce_ex__</ dfn > (< var > protocol_version</ var > )</ code > </ a >
You can’t perform that action at this time.
0 commit comments