I would also suggest taking a look at human friendly 
https://pypi.org/project/humanfriendly/ which does a lot this for you on the 
user input/output front.

Steve Barnes

From: malin...@163.com<mailto:malin...@163.com>
Sent: 13 October 2020 13:14
To: python-ideas@python.org<mailto:python-ideas@python.org>
Subject: [Python-ideas] Add _KB, _MB, _GB to numeric literals

PEP 515 added underscore to numeric literals, it brings better readability.

    PEP 515 -- Underscores in Numeric Literals
    https://www.python.org/dev/peps/pep-0515/

Is it possible to add _KB, _MB, _GB to numeric literals, for example:

     200_KB   (200*1024)
     150_MB   (150*1024*1024)
     2_GB     (2*1024*1024*1024)

Do you think it's a good code style?
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/QIKCXSOP6UZDSPJ5RJKX7EAXF7YAJYLK/
Code of Conduct: http://python.org/psf/codeofconduct/

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/P36LFMS3BAFGTABZVW725P3234C6R5LK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to