[Python-ideas] real numbers with SI scale factors: next steps

Random832 random832 at fastmail.com
Wed Aug 31 13:50:44 EDT 2016


On Wed, Aug 31, 2016, at 13:43, Random832 wrote:
> And the actual -h behavior of those system utilities you mentioned is
> "123k", "1.2M", "12M", with the effect being that the value always fits
> within a four-character field width, but this isn't a fixed number of
> decimal places *or* significant digits.

I just did some testing... it can go to five characters when binary
prefixes are used for e.g. "1023K".

Also, interesting quirk - it always rounds up. 1025 bytes is "1.1K", and
in SI mode, 1001 bytes is "1.1k"


More information about the Python-ideas mailing list