Author: Ronan Lamy <[email protected]>
Branch: py3.6
Changeset: r95054:4f3876339fff
Date: 2018-09-01 13:52 +0200
http://bitbucket.org/pypy/pypy/changeset/4f3876339fff/

Log:    (lucaz97, ronan) Handle underscores in Decimal constructor

diff --git a/lib_pypy/_decimal.py b/lib_pypy/_decimal.py
--- a/lib_pypy/_decimal.py
+++ b/lib_pypy/_decimal.py
@@ -234,6 +234,7 @@
 
     @classmethod
     def _from_str(cls, value, context, exact=True, strip=True):
+        value = value.replace("_", "")
         s = str.encode(value, 'ascii', '_decimal_encode')
         if b'\0' in s:
             s = b''  # empty string triggers ConversionSyntax.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to