]> granicus.if.org Git - python/commitdiff
Don't specify base 0 to string.atoi when unpickling integers in text
authorGuido van Rossum <guido@python.org>
Wed, 10 Dec 1997 19:36:41 +0000 (19:36 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 10 Dec 1997 19:36:41 +0000 (19:36 +0000)
mode.  The pickler always uses base 10 so the default base should be
fine.  (The base gets us in trouble when there's no strop module, as
the atoi() in string.py only supports base 10.  This is for JPython.)

Lib/pickle.py

index 3068b4147b77b858a627212b5e9090f32b8d2ba2..2ec9a4351fe6ee53fb64d526300176aeb453569b 100644 (file)
@@ -519,7 +519,7 @@ class Unpickler:
     dispatch[NONE] = load_none
 
     def load_int(self):
-        self.append(string.atoi(self.readline()[:-1], 0))
+        self.append(string.atoi(self.readline()[:-1]))
     dispatch[INT] = load_int
 
     def load_binint(self):