This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients elias, jyasskin, mark.dickinson, rhettinger, serhiy.storchaka
Date 2018-03-02.15:47:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1520005665.56.0.467229070634.issue32968@psf.upfronthosting.co.za>
In-reply-to
Content
[Elias Zamaria]

> I see exactly that.

Understood; that's how I interpreted your "changed one test to make sure that it works". It seems we understand each other. :-)

So yes, one always needs to be very cautious about changing deliberate, tested behaviour. But in this case I'm satisfied that I understand what the intent was when that test was written, namely that `Real.__floordiv__` returns an `Integral`. And since that part of PEP 3141 didn't actually get implemented for float // float (and the agreement on #22444 was that the PEP should be changed rather than the behaviour), that intent is now a little bogus, and I think it's reasonable to change the behaviour in this case. The change would make the overall behaviour of mixed-type operations simple to state and understand, and fix a consistency bug. It's also sufficiently much of a corner case that the change seems unlikely to break existing code.

In short, I'm +1 on making your suggested change to __floordiv__ as well as to __mod__.

I'm adding Jeffrey Yasskin (the original PEP 3141 author) to the nosy list, in case he has any comment. (I don't believe Jeffrey is still watching Python development, but would be happy to be proved wrong.)
History
Date User Action Args
2018-03-02 15:47:45mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, jyasskin, elias, serhiy.storchaka
2018-03-02 15:47:45mark.dickinsonsetmessageid: <1520005665.56.0.467229070634.issue32968@psf.upfronthosting.co.za>
2018-03-02 15:47:45mark.dickinsonlinkissue32968 messages
2018-03-02 15:47:45mark.dickinsoncreate