diff options
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r-- | Lib/pickle.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 8be7a8d..d5773e2 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -615,7 +615,11 @@ class Unpickler: dispatch[NONE] = load_none def load_int(self): - self.append(int(self.readline()[:-1])) + data = self.readline() + try: + self.append(int(data)) + except ValueError: + self.append(long(data)) dispatch[INT] = load_int def load_binint(self): |