[New-bugs-announce] [issue15544] math.isnan fails with some Decimal NaNs

Steven D'Aprano report at bugs.python.org
Fri Aug 3 04:54:03 CEST 2012


New submission from Steven D'Aprano:

math.nan fails on some Decimal NANs. For example, while this works:

  >>> import math
  >>> from decimal import Decimal
  >>> math.isnan(Decimal('nan'))
  True

These both fail with ValueError:

  math.isnan(Decimal('snan'))
  math.isnan(Decimal('nan123'))


(Tested on Python 3.2 and 3.3.0a1)

----------
messages: 167284
nosy: stevenjd
priority: normal
severity: normal
status: open
title: math.isnan fails with some Decimal NaNs
versions: Python 3.3

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


More information about the New-bugs-announce mailing list