Message227303
Alexander Belopolsky <report@bugs.python.org> wrote:
> Raymond suggested that "The PEP 3141 should be revised to say that floor division is defined to return a value that is *equal* to an Integral".
I guess it should say "equal to an Integral or a special value".
> Since nan or inf are not *equal* to any Integral, the current implementation does not comply. In the absence of a recommendation in the PEP, implementers of new numeric types are left with little guidance because existing types are inconsistent:
>
> >>> Decimal('inf') // 1
> Decimal('Infinity')
> >>> float('inf') // 1
> nan
I think both should return inf. |
|
Date |
User |
Action |
Args |
2014-09-22 19:48:40 | skrah | set | recipients:
+ skrah, tim.peters, rhettinger, mark.dickinson, belopolsky, pitrou, casevh, Arfrever, alex |
2014-09-22 19:48:40 | skrah | link | issue22444 messages |
2014-09-22 19:48:40 | skrah | create | |
|