Mark Dickinson <dicki...@gmail.com> added the comment:

[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.)

----------
nosy: +jyasskin

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to