Author sk1d
Recipients sk1d
Date 2018-02-08.02:08:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The documentation starts the the string format parameter 'g':

General format. For a given precision p >= 1, this rounds the number to **p significant digits** and then formats the result in either fixed-point format or in scientific notation, depending on its magnitude.

I think the behavior of format is inconsistent here:
>>> format(0.1949, '.2g')
returns '0.19' as expected but
>>> format(0.1950, '.2g')
returns '0.2' instead of '0.20'

This behavior for float is in my opinion the correct one here
>>> format(0.1950, '.2f')
returns '0.20'
Date User Action Args
2018-02-08 02:08:37sk1dsetrecipients: + sk1d
2018-02-08 02:08:36sk1dsetmessageid: <>
2018-02-08 02:08:36sk1dlinkissue32790 messages
2018-02-08 02:08:35sk1dcreate