Message196213
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. |
|
Date |
User |
Action |
Args |
2013-08-26 15:38:40 | steven.daprano | set | recipients:
+ steven.daprano, docs@python |
2013-08-26 15:38:40 | steven.daprano | set | messageid: <1377531520.63.0.106544243675.issue18841@psf.upfronthosting.co.za> |
2013-08-26 15:38:40 | steven.daprano | link | issue18841 messages |
2013-08-26 15:38:40 | steven.daprano | create | |
|