Guido van Rossum  committed 95929b0

Don't specify base 0 to string.atoi when unpickling integers in text
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 only supports base 10. This is for JPython.)

  • Participants
  • Parent commits 773fbc8
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/

     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):