[issue8947] Provide as_integer_ratio() method to Decimal

Alexander Belopolsky report at bugs.python.org
Fri Jun 25 20:27:20 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Raymond,

conversion to Fraction does not really help in my use case of supporting timedelta * Decimal by duck typing.  I can think of many other use cases where it will be helpful to accept either float or decimal without loss of precision.  Is there an alternative way to achieve that which does not require importing the decimal module first?

----------

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


More information about the Python-bugs-list mailing list