[issue15882] _decimal.Decimal constructed from tuple
Stefan Krah
report at bugs.python.org
Tue Sep 11 08:55:48 CEST 2012
Stefan Krah added the comment:
Thanks for the report and the patch. I used another approach that still
validates the digits in the coefficient tuple even if it is not used.
decimal.py allows any coefficient:
>>> Decimal((0, ('n', 'a', 'n'), 'F'))
Decimal('Infinity')
_decimal raises:
>>> Decimal((0, ('n', 'a', 'n'), 'F'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: coefficient must be a tuple of digits
I'm leaving the issue open: If some release blocker arises, we could get this
into 3.3.0-rc3.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15882>
_______________________________________
More information about the Python-bugs-list
mailing list