[Python-ideas] SI scale factors in Python
Paul Moore
p.f.moore at gmail.com
Thu Aug 25 05:06:04 EDT 2016
On 25 August 2016 at 09:54, Ken Kundert <python-ideas at shalmirane.com> wrote:
> 1G -> 1e+09
> 1M -> 1e+06
> 1k -> 1e+03
While these suffixes are suitable for a scientific context, in a
computing context, 1k=1024, 1M=1024*1024 and 1G=1024*1024*1024 make
just as much, if not more, sense (and yes, I'm aware of Gigabyte vs
Gibibyte).
If "1M" were a legal Python literal,. I would expect a lot of
confusion over what it meant - to the extent that it would hurt
readability badly.
Paul
More information about the Python-ideas
mailing list