This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients docs@python, steven.daprano
Date 2013-08-26.15:38:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377531520.63.0.106544243675.issue18841@psf.upfronthosting.co.za>
In-reply-to
Content
math.isfinite currently raises ValueError when given a Decimal sNAN (signalling NAN).

I've run into a situation where I'm calling isfinite() on a numeric value which may be a Decimal sNAN, and it would be nice if it returned False.

On the other hand, see the discussion on issue 15544, which possibly leads to the conclusion that raising ValueError is the right thing to do.

http://bugs.python.org/issue15544

Either way, behaviour should be documented.
History
Date User Action Args
2013-08-26 15:38:40steven.dapranosetrecipients: + steven.daprano, docs@python
2013-08-26 15:38:40steven.dapranosetmessageid: <1377531520.63.0.106544243675.issue18841@psf.upfronthosting.co.za>
2013-08-26 15:38:40steven.dapranolinkissue18841 messages
2013-08-26 15:38:40steven.dapranocreate