New submission from Steven D'Aprano:

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.

----------
assignee: docs@python
components: Documentation, Library (Lib)
messages: 196213
nosy: docs@python, stevenjd
priority: normal
severity: normal
status: open
title: math.isfinite fails with Decimal sNAN
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18841>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to