[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.
Facundo Batista
report at bugs.python.org
Wed Feb 6 16:23:18 CET 2008
Facundo Batista added the comment:
I'm +0 to make Decimal(Rational(x,y)) available.
I'd make it something like:
Decimal(R) == Decimal(R.numerator) / Decimal(R.denominator)
Note, as Raymond says, that this division implies the use of the
context. So the following will NOT be true:
R == Rational(Decimal(R))
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1682>
__________________________________
More information about the Python-bugs-list
mailing list