missing pickling methods in Storage, thanks marius.v.niekerk
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-07-18 14:16:32) dev
|
Version 2.00.0 (2012-07-18 14:20:43) dev
|
||||||
|
|||||||
@@ -166,6 +166,12 @@ class Storage(dict):
|
|||||||
return value[-1]
|
return value[-1]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def __getinitargs__(self):
|
||||||
|
return ()
|
||||||
|
|
||||||
|
def __getnewargs__(self):
|
||||||
|
return ()
|
||||||
|
|
||||||
PICKABLE = (str,int,long,float,bool,list,dict,tuple,set)
|
PICKABLE = (str,int,long,float,bool,list,dict,tuple,set)
|
||||||
def PickleableStorage(data):
|
def PickleableStorage(data):
|
||||||
return Storage(dict((k,v) for (k,v) in data.items() if isinstance(v,PICKABLE)))
|
return Storage(dict((k,v) for (k,v) in data.items() if isinstance(v,PICKABLE)))
|
||||||
|
|||||||
Reference in New Issue
Block a user