1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-20 13:00:51 -07:00
Copied from Perforce
 Change: 195139
This commit is contained in:
Gareth Rees 2018-09-23 22:59:38 +01:00
parent 8c14e1a600
commit ec70bbf11a

View file

@ -176,8 +176,7 @@ def telemetry_decoder(read):
# SI_PREFIX[i] is the SI prefix for 10 to the power of 3(i-8).
SI_PREFIX = list('yzafpnµm kMGTPEZY')
SI_PREFIX[8] = ''
SI_PREFIX = list('yzafpnµm') + [''] + list('kMGTPEZY')
def with_SI_prefix(y, precision=5, unit=''):
"Turn the number y into a string using SI prefixes followed by unit."