Steven D'Aprano added the comment: Attached is a patch for decimal.py, and test_decimal.py. I cannot provide a patch for the C decimal implementation, sorry.
Following Mark's suggestion, my patch keeps the sign but discards the payload for quiet NANs, and raises ValueError for signalling NANs. (I'm ambivalent about signalling NANs raising ValueError, but I guess that's better than having snan silently converted to a quiet nan.) ---------- keywords: +patch Added file: http://bugs.python.org/file26672/decimalnan.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15544> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com