Message313833
Thanks for the PR (and apologies for being slow to look at it). I think we want to use the operator_fallbacks approach for both __rfloordiv__ and __floordiv__ (and similarly for __rmod__ and __mod__), else we'll get inconsistent results:
>>> Fraction(3) // 5.0 # get float, as expected
0.0
>>> 3.0 // Fraction(5) # expect a float, get an integer
0
Please could you make that change and add a couple more tests that cover this case? |
|
Date |
User |
Action |
Args |
2018-03-14 18:14:57 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, jyasskin, elias, serhiy.storchaka |
2018-03-14 18:14:57 | mark.dickinson | set | messageid: <1521051297.82.0.467229070634.issue32968@psf.upfronthosting.co.za> |
2018-03-14 18:14:57 | mark.dickinson | link | issue32968 messages |
2018-03-14 18:14:57 | mark.dickinson | create | |
|