Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: Do you mean decimal or binary prefixes? 123901842 bytes can be formatted as "118.2 MiB". In different areas decimal and binary prefixes can be more common. For example the volume of hard disks usually is specified with decimal prefixes, but the volume of RAM -- with binary prefixes (32 GiB, not 34.4 GB). Sometimes even mixed prefixes can be used (1 MB = 1024000 bytes).
And when we talk about human-readability, we can't ignore localization. For many people "123,9 МБ" looks more human-readable than "123.9 MB". This is a complex problem and needs a complex solution. You can start from writing a special purposed package and adding it on PyPI. Maybe there are existing packages that solve this problem. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31749> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com