Author: Carl Friedrich Bolz-Tereick <cfb...@gmx.de> Branch: py3.6 Changeset: r96145:3b7015c3581a Date: 2019-02-24 15:06 +0100 http://bitbucket.org/pypy/pypy/changeset/3b7015c3581a/
Log: fix test_decimal diff --git a/lib_pypy/_decimal.py b/lib_pypy/_decimal.py --- a/lib_pypy/_decimal.py +++ b/lib_pypy/_decimal.py @@ -1295,6 +1295,13 @@ raise RuntimeError("Invalid error flag", trapped) def create_decimal(self, num="0"): + """Creates a new Decimal instance but using self as context. + + This method implements the to-number operation of the + IBM Decimal specification.""" + + if isinstance(num, str) and (num != num.strip() or '_' in num): + num = '' # empty string triggers ConversionSyntax return Decimal._from_object(num, self, exact=False) def create_decimal_from_float(self, f): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit