Author elias
Recipients elias, jyasskin, mark.dickinson, rhettinger, serhiy.storchaka
Date 2018-03-16.04:12:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Mark, I tried `Fraction(10**23) // 1e22`, and I got 10.

Your `10**23 // 1e22` example was strange, but then `int(1e23)` and got 99999999999999991611392. That is kind of unexpected but I think it is rare for anyone to do something like that with numbers that big.

I think the fact that floating-point rounding error sometimes causes strange results is not a reason to do really unexpected things like making 1.0 // 1/10 equal 9.0, if that can be reasonably avoided.

I updated my pull request with my change, which you suggested, to make __rfloordiv__ and __rmod__ return a float, but with a small change to _operator_fallbacks to avoid the rounding error, so 1.0 // 1/10 is 10.0. You can see it at What do you think?
Date User Action Args
2018-03-16 04:12:13eliassetrecipients: + elias, rhettinger, mark.dickinson, jyasskin, serhiy.storchaka
2018-03-16 04:12:13eliassetmessageid: <>
2018-03-16 04:12:13eliaslinkissue32968 messages
2018-03-16 04:12:13eliascreate