[issue32968] Fraction modulo infinity should behave consistently with other numbers

Elias Zamaria report at bugs.python.org
Fri Mar 23 23:11:42 EDT 2018


Elias Zamaria <mikez302 at gmail.com> added the comment:

Mark, you have some good points. I didn't fully think about the implications of my change. I undid the change to _operator_fallbacks.

I updated the tests to expect 1.0 // 1/10 to equal 9.0 and 1.0 % 1/10 to equal 0.09999999999999995. That latter number seems a bit awkward though. Can I expect the result to always come out like that, or could it depend on the hardware the test is run on? If we can't depend on that result, do you have any suggestions?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32968>
_______________________________________


More information about the Python-bugs-list mailing list