Author: Amaury Forgeot d'Arc <amaur...@gmail.com>
Branch: py3.6
Changeset: r93622:ff9805f6a687
Date: 2018-01-03 22:51 +0100
http://bitbucket.org/pypy/pypy/changeset/ff9805f6a687/

Log:    Allow undescores in int() literals.

diff --git a/pypy/objspace/std/intobject.py b/pypy/objspace/std/intobject.py
--- a/pypy/objspace/std/intobject.py
+++ b/pypy/objspace/std/intobject.py
@@ -810,7 +810,7 @@
 
 def _string_to_int_or_long(space, w_inttype, w_source, string, base=10):
     try:
-        value = string_to_int(string, base)
+        value = string_to_int(string, base, allow_underscores=True)
     except ParseStringError as e:
         raise wrap_parsestringerror(space, e, w_source)
     except ParseStringOverflowError as e:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to