Message257145
Proposed patch makes following things:
1. Rewrite error messages in float.as_integer_ratio() and Python implementation of Decimal.as_integer_ratio() in more general form, not mentioning as_integer_ratio(), as in C implementation of Decimal.as_integer_ratio().
2. Use Decimal.as_integer_ratio() to convert Decimal to Fraction.
3. Get rid of additional checks in Fraction constructor that raise errors with appropriate messages, since new error messages from as_integer_ratio() are appropriate enough.
This speeds up creating a Fraction from float and Decimal 2 to 3 times. |
|
Date |
User |
Action |
Args |
2015-12-28 22:48:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, facundobatista, mark.dickinson, skrah |
2015-12-28 22:48:17 | serhiy.storchaka | set | messageid: <1451342898.0.0.236832633563.issue25971@psf.upfronthosting.co.za> |
2015-12-28 22:48:17 | serhiy.storchaka | link | issue25971 messages |
2015-12-28 22:48:17 | serhiy.storchaka | create | |
|