parent
f8f8567984
commit
07a1628954
@ -0,0 +1,14 @@
|
|||||||
|
"""A pickle wrapper module with protocol=-1 by default."""
|
||||||
|
|
||||||
|
try:
|
||||||
|
import cPickle as pickle # PY2
|
||||||
|
except ImportError:
|
||||||
|
import pickle
|
||||||
|
|
||||||
|
|
||||||
|
def loads(s):
|
||||||
|
return pickle.loads(s)
|
||||||
|
|
||||||
|
|
||||||
|
def dumps(obj):
|
||||||
|
return pickle.dumps(obj, protocol=-1)
|
Loading…
Reference in new issue