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 eric.smith
Recipients eric.smith, marco_ocram, mark.dickinson, rhettinger, ronaldoussoren, steven.daprano, stutzbach, tim.peters, veky
Date 2020-08-26.18:01:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1598464866.99.0.615147309291.issue41598@roundup.psfhosted.org>
In-reply-to
Content
If you're using round(str(some_float), digits) and the result is a float, then that's a problem, since you're going to round it again for display at some point.

If you want a string result, you're better off using format(float, format_spec), or f-strings, or str.format() (all of which have the same underlying implementation) to do your float-to-string-for-display-purposes work.

I just don't see how getting a binary float via decimal rounding would be useful.
History
Date User Action Args
2020-08-26 18:01:07eric.smithsetrecipients: + eric.smith, tim.peters, rhettinger, ronaldoussoren, mark.dickinson, stutzbach, steven.daprano, veky, marco_ocram
2020-08-26 18:01:06eric.smithsetmessageid: <1598464866.99.0.615147309291.issue41598@roundup.psfhosted.org>
2020-08-26 18:01:06eric.smithlinkissue41598 messages
2020-08-26 18:01:06eric.smithcreate