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

Serhiy Storchaka report at bugs.python.org
Thu Mar 15 08:06:34 EDT 2018


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

mpd_as_integer() is used internally in the Decimal class. Do you have use cases for it outside of the Decimal class?

And the question was about using float.is_integer(). I have not found *any* sane example on GitHub. The most harmless is just a demo

    >>> x = 3.0
    >>> print(x.is_integer())
    True

Other examples are so bad that make me angry.

----------

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


More information about the Python-bugs-list mailing list