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 grottrumsel
Recipients docs@python, grottrumsel
Date 2018-10-31.17:07:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541005659.07.0.788709270274.issue35126@psf.upfronthosting.co.za>
In-reply-to
Content
In this question:
https://docs.python.org/2.7/faq/programming.html#how-do-i-convert-a-number-to-a-string

There is a statement:
"{:.3f}".format(1/3) yields '0.333'

While

In [2]: "{:.3f}".format(1/3)
Out[2]: '0.000'

In [3]: "{:.3f}".format(1/3.0)
Out[3]: '0.333'
History
Date User Action Args
2018-10-31 17:07:39grottrumselsetrecipients: + grottrumsel, docs@python
2018-10-31 17:07:39grottrumselsetmessageid: <1541005659.07.0.788709270274.issue35126@psf.upfronthosting.co.za>
2018-10-31 17:07:39grottrumsellinkissue35126 messages
2018-10-31 17:07:38grottrumselcreate