[New-bugs-announce] [issue11680] decimal module generates AttributeError: on call to as_integer_ratio

David Bailey report at bugs.python.org
Sat Mar 26 01:45:38 CET 2011


New submission from David Bailey <daveabailey at gmail.com>:

File "C:\test3.py", line 166, in m
    self.from_float(value * decimal.Decimal(1.0))/decimal.Decimal(1.0)
  File "c:\Python27\lib\decimal.py", line 691, in from_float
    n, d = abs(f).as_integer_ratio()
AttributeError: 'Decimal' object has no attribute 'as_integer_ratio'

line 691 in decimal.py 
      
n, d = abs(f).as_integer_ratio()

should be

n, d = _math.fabs(f).as_integer_ratio()

----------
components: Library (Lib)
messages: 132194
nosy: daveabailey
priority: normal
severity: normal
status: open
title: decimal module generates AttributeError: on call to as_integer_ratio
type: crash
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11680>
_______________________________________


More information about the New-bugs-announce mailing list