You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
"""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)
|