This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients FlipperPA, miserlou2, mivade, serhiy.storchaka
Date 2017-10-10.20:00:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507665632.4.0.213398074469.issue31749@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-10-10 20:00:32serhiy.storchakasetrecipients: + serhiy.storchaka, mivade, miserlou2, FlipperPA
2017-10-10 20:00:32serhiy.storchakasetmessageid: <1507665632.4.0.213398074469.issue31749@psf.upfronthosting.co.za>
2017-10-10 20:00:32serhiy.storchakalinkissue31749 messages
2017-10-10 20:00:32serhiy.storchakacreate