New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use binary prefixes #61395
Comments
Starting around 1998, a number of standards and trade organizations approved standards and recommendations for a new set of binary prefixes that would refer unambiguously to powers of 1024. According to these, the SI prefixes would only be used in the decimal sense, even when referring to data storage capacities: kilobyte and megabyte would denote one thousand bytes and one million bytes respectively (consistent with SI), while new terms such as kibibyte, mebibyte and gibibyte, abbreviated KiB, MiB, and GiB, would denote 1024 bytes, 1048576 bytes, and 1073741824 bytes respectively.[1] The proposed patch replaces old terms such as kB or KBytes by new terms such as KiB. |
Patch looks good except for the consistent lack of space between number and unit, e.g. "5MiB" instead of "5 MiB". Is there a reason for this? |
Yes, there is a little reason. It looks ugly if a line broken between number and unit (this is possible if we use space). A non-breakable space is better, but it seems that there is no easy way to specify it in ReST. I will be glad to be wrong. |
It might be ugly but it's also incorrect formatting to leave the space out. =) And I think it makes it harder to actually read the number. If you really want to avoid the breaking you can use the tip at http://stackoverflow.com/questions/11830242/non-breaking-space or the Unicode \xa0 literal. |
Yes I have seen these tips and they look complicated enough. Here is an updated patch with spaces between numbers and units. |
LGTM |
For what versions can I apply this patch? |
IMO I say just do 3.4 since it isn't really a bug fix but a cleanup, but I wouldn't object if it was backported. |
Then I'll apply this to 3.3 too. This will facilitate support of both versions. |
+1 I left some comments on Rietveld. |
I agree that we should contribute to ending the confusion. Searching KiB, MiB, GiB (with Google) gives a Wikipedia article as first or second hit, so the meanings of the abbreviations and terms are easily discoverable. |
New changeset c1f846a99c85 by Serhiy Storchaka in branch '3.3': New changeset 73a16d3c066a by Serhiy Storchaka in branch 'default': |
Thank you, Ezio, for your comments. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: