Message108944
After discussions on IRC, I'm going to close this as rejected. Convergence of the float and Decimal APIs is a nice idea, but in this case it's not clear that it really works. In particular, for duck typing to be sensible, int and Fraction would also have to grow an as_integer_ratio method. And that seems a superfluous when those two types already have the same functionality in the form of .numerator and .denominator attributes.
I also agree with Raymond that we shouldn't be fattening the decimal API without good reason.
Alexander: wouldn't conversion to Fraction solve the issue in this case? The Fraction constructor accepts floats, Decimal instances and ints directly. |
|
Date |
User |
Action |
Args |
2010-06-29 20:07:28 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, belopolsky, skrah |
2010-06-29 20:07:27 | mark.dickinson | set | messageid: <1277842047.83.0.33124375772.issue8947@psf.upfronthosting.co.za> |
2010-06-29 20:07:25 | mark.dickinson | link | issue8947 messages |
2010-06-29 20:07:25 | mark.dickinson | create | |
|