Message305611
> allows Fraction instantiation from duck-typing classes that provide as_integer_ratio
This would allow the numpy `np.floating` types to take part in `Fraction` conversion as well, which would be great.
As far as I can tell, `Decimal` already follows this duck-typing, so it would be a shame for other modules not to.
Perhaps an `num, den = operator.rational(x)` is needed to unify this code across the places that coerce rational numbers. |
|
| Date |
User |
Action |
Args |
| 2017-11-05 23:21:38 | Eric.Wieser | set | recipients:
+ Eric.Wieser, mark.dickinson, serhiy.storchaka, wolma, josh.r |
| 2017-11-05 23:21:38 | Eric.Wieser | set | messageid: <[email protected]> |
| 2017-11-05 23:21:38 | Eric.Wieser | link | issue28716 messages |
| 2017-11-05 23:21:38 | Eric.Wieser | create | |
|