[Python-ideas] SI scale factors alone, without units or dimensional analysis
Arek Bulski
arek.bulski at gmail.com
Sat Aug 27 05:04:00 EDT 2016
SI units are a standard that was kind of imposed top down on the computer
science community. But we learned to use KB MB so why no keep the defacto
standard we already have? Kibibytes and mibibytes were never really
adopted.
1K == 1000
1KB == 1024
1M == 1000**2
1MB == 1024**2
Suffixes, simple.
int_value = 8M
float_value = 8.0M or float("8M")
fraction_value = Fraction(1M, 8) or Fraction("1M/8")
decimal_value = Decimal("1.2345M")
Suffixes are by definition at the end of a literal. So
1E1E == 1E1 * 1E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160827/7f1d481e/attachment.html>
More information about the Python-ideas
mailing list