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 ana
Recipients ana, docs@python
Date 2018-02-01.00:08:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517443696.2.0.467229070634.issue32737@psf.upfronthosting.co.za>
In-reply-to
Content
>>> version_info
(3, 0, 1, 'final', 0)
# I know this is an older version---stuck with it at work.
# I did not see this issue in the tracker (380 results for nan).
# Perhaps there is better documentation for how to use the issue
# tracker. Many of the links on the Dealing with Bugs page---
# https://docs.python.org/3/bugs.html#contributing-to-python
# ---are not helpful, e.g., 'contribute' just links back the same
# page.
#
# There are similar problems with inf and -inf
>>> isnan(float('nan'))
True
>>> repr(float('nan'))
'nan'
>>> '{0:f}'.format(float('nan'))
'-1.#IND00'
>>> '{0:F}'.format(float('nan'))
'-1.#IND00'
>>> '{0:g}'.format(float('nan'))
'-1.#IND'
>>> '{0:G}'.format(float('nan'))
'-1.#IND'
>>> '{0:.2f}'.format(float('nan'))
'-1.#J'

# c.f. https://docs.python.org/3/library/string.html#formatspec
History
Date User Action Args
2018-02-01 00:08:16anasetrecipients: + ana, docs@python
2018-02-01 00:08:16anasetmessageid: <1517443696.2.0.467229070634.issue32737@psf.upfronthosting.co.za>
2018-02-01 00:08:16analinkissue32737 messages
2018-02-01 00:08:16anacreate