[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

Serhiy Storchaka report at bugs.python.org
Mon Mar 12 15:27:16 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

What is the use case of float.is_integer() at all? I haven't found its usages in large projects on GitHub. Only in playing examples where it is (mis)used in cases like (x/5).is_integer() (x % 5 == 0 is better) or (x**0.5).is_integer() (wrong for some floats or large integers).

Maybe it should be removed in Python 3.0.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26680>
_______________________________________


More information about the Python-bugs-list mailing list