Message207
pickle.Unpickler.load_long() has bug, which does not allow to unpickle long
values.
Version of pickle.Unpickler.load_long I had:
def load_long(self):
self.append(string.atol(self.readline()[:-1], 0))
dispatch[LONG] = load_long
Possible fix (it works for me):
def load_long(self):
self.append(string.atol(self.readline()[:-2]))
dispatch[LONG] = load_long
How to check:
import pickle
l=123L
s=pickle.dumps(l,1)
o=pickle.loads(s)
|
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:16:45 | admin | link | issue222879 messages |
| 2008-02-20 17:16:45 | admin | create | |
|