[pypy-commit] pypy default: Merged in bpo-16055 (pull request #691)

arigo pypy.commits at gmail.com
Mon Dec 30 04:04:44 EST 2019


Author: Armin Rigo <armin.rigo at gmail.com>
Branch: 
Changeset: r98409:185d1d278712
Date: 2019-12-30 09:04 +0000
http://bitbucket.org/pypy/pypy/changeset/185d1d278712/

Log:	Merged in bpo-16055 (pull request #691)

	Implement bpo-16055: Fixes incorrect error text for int('1',
	base=1000)

diff --git a/rpython/rlib/rstring.py b/rpython/rlib/rstring.py
--- a/rpython/rlib/rstring.py
+++ b/rpython/rlib/rstring.py
@@ -534,7 +534,7 @@
             else:
                 base = 10
         elif base < 2 or base > 36:
-            raise InvalidBaseError("%s() base must be >= 2 and <= 36" % fname)
+            raise InvalidBaseError("%s() base must be >= 2 and <= 36, or 0" % fname)
         self.base = base
 
         # Leading underscores are not allowed


More information about the pypy-commit mailing list