[docs] [issue18841] math.isfinite fails with Decimal sNAN

Mark Dickinson report at bugs.python.org
Wed Aug 6 14:18:12 CEST 2014


Mark Dickinson added the comment:

Mark: it's not really ready for a patch, since there's no agreement yet on how best to solve this.  In fact, I'm tempted to close as "wont fix": the argument is that the math module consists for the most part only of thin wrappers around the platform math library.

The underlying need (as far as I understand it) is to be able to tell whether a given number is a nan or not without having to know in advance whether it's a float, int or Decimal instance.  There may be other ways of achieving this goal (like adding an `is_nan` method to `float` and `int`, for example.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18841>
_______________________________________


More information about the docs mailing list