我做错了什么:
class A(collections.OrderedDict):
def __init__(self,*largs,**kwargs):
super(A,self).__init__(*largs,**kwargs);
def __reduce__(self):
return super(A,self).__reduce__()
dt = collections.OrderedDict([(1,3),(34,2)]) # pickles fine
d=A([(1,3),(34,2)]) # pickles fine
js=pickle.dumps([d,dt])
print(js)
temp = pickle.loads(js)
print(temp)
# but it does not jsonpickle.decode ????
js=jsonpickle.encode(d)
print(js)
temp = jsonpickle.decode(js)
print(temp)
答案 0 :(得分:0)
很明显,我应该为我的课程注册一个特殊的处理程序:
SourceControl.CheckoutItem
然后它起作用