Message241637
Is it not reasonable to simply say that implementations of numbers.Rational which allow the numerator and denominator to have types for which true division doesn't return a float, have to provide their own implementation of __float__()?
It's certainly less convenient, and probably surprising for users, but the alternative is trying to work around broken integer types - after all numbers.Complex.__truediv__ says "Should promote to float when necessary" in the docstring, which to me says that a type where a/b doesn't return a float doesn't conform to the numeric tower. |
|
| Date |
User |
Action |
Args |
| 2015-04-20 12:50:26 | paul.moore | set | recipients:
+ paul.moore, mark.dickinson, wolma |
| 2015-04-20 12:50:26 | paul.moore | set | messageid: <1429534226.25.0.329461268888.issue23975@psf.upfronthosting.co.za> |
| 2015-04-20 12:50:26 | paul.moore | link | issue23975 messages |
| 2015-04-20 12:50:26 | paul.moore | create | |
|