[issue22444] Floor divide should return int
Case Van Horsen
report at bugs.python.org
Sat Sep 20 19:13:22 CEST 2014
Case Van Horsen added the comment:
>> What should Decimal('1e123456')//1 return?
>
> I think Decimal case should be considered separately. Note that unlike float, they are not part of the numerical tower, so PEP 3141 arguments don't apply:
>
>>>> isinstance(1.0, numbers.Real)
> True
>>>> isinstance(decimal.Decimal(1), numbers.Real)
> False
>
I maintain gmpy2 and I've had requests to support the numeric tower.
gmpy2 has integral, rational, real, and complex types so I should be
able to.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22444>
_______________________________________
More information about the Python-bugs-list
mailing list