[Python-ideas] Fwd: Make `float('inf') //1 == float('inf')`

Petr Viktorin encukou at gmail.com
Fri Sep 19 10:54:22 CEST 2014


On Thu, Sep 18, 2014 at 9:35 PM, Guido van Rossum <guido at python.org> wrote:
>
> On Sep 18, 2014 12:31 PM, "Alexander Belopolsky"
> <alexander.belopolsky at gmail.com> wrote:

>
> Right.
>
>> In light of PEP 3141, if anything should be done about float // float it
>> would be to make it return and int and as a consequence inf // 1 should
>> raise an OverflowError.
>
> +1

But, is this a good change to make in 3.5?

I assume this would apply do __divmod__[0] as well.

Should there be a float-only math.divmod?


More information about the Python-ideas mailing list