You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> round(Decimal('0.5'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".venv/lib/python2.7/site-packages/future/builtins/newround.py", line 42, in newround
d = Decimal.from_float(number).quantize(exponent,
File "/Users/tpict/.asdf/installs/python/2.7.16/lib/python2.7/decimal.py", line 690, in from_float
n, d = abs(f).as_integer_ratio()
AttributeError: 'Decimal' object has no attribute 'as_integer_ratio'
The newround function doesn't check if the input is of type Decimal before trying to convert it to one.
The text was updated successfully, but these errors were encountered:
The
newround
function doesn't check if the input is of typeDecimal
before trying to convert it to one.The text was updated successfully, but these errors were encountered: