Just to mention, these K M G suffixes are dimensionless. They can be used simply out of convenience, like 4K is a shorthand for 4000. And 9G is definitely easier to write and *therefore less prone to error* than a full literal. Dimensional analysis is fine but not the only reason to add these.
pozdrawiam, Arkadiusz Bulski 2016-08-27 11:04 GMT+02:00 Arek Bulski <arek.bul...@gmail.com>: > 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 > > >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/