[issue31749] Request: Human readable byte amounts in the standard library

Michael DePalatis report at bugs.python.org
Tue Oct 10 14:14:40 EDT 2017


Michael DePalatis <mike at depalatis.net> added the comment:

This would be a useful feature, but I don't think it quite fits in the math package. It might make more sense to use this with string formatting, for example:

{:h}.format(filesize)

where I use h as the format specifier since it doesn't appear to be taken yet and would be in line with "human-readable" options in tools like ls.

----------
nosy: +mivade

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31749>
_______________________________________


More information about the Python-bugs-list mailing list