[docs] Use binary prefixes (issue 17193)

ezio.melotti at gmail.com ezio.melotti at gmail.com
Fri Feb 15 23:39:47 CET 2013


http://bugs.python.org/review/17193/diff/7360/Doc/howto/unicode.rst
File Doc/howto/unicode.rst (right):

http://bugs.python.org/review/17193/diff/7360/Doc/howto/unicode.rst#newcode459
Doc/howto/unicode.rst:459: chunks (say, 1 KiB or 4 KiB), you need to
write error-handling code to catch the case
On 2013/02/15 22:57:38, storchaka wrote:
> On 2013/02/15 22:17:02, ezio.melotti wrote:
> > I would leave this alone, or possibly change it to "1k or 4k bytes".
> 
> I doubt anyone reads the file in chunks of 1000 or 4000 bytes. It's
rather 1024
> or 4096 bytes.

Using powers of 2 is common, but is there any real advantage?  If you
still want to keep powers of 2 I would prefer to use "1024 or 4096
bytes" rather than using KiB.

http://bugs.python.org/review/17193/diff/7360/Doc/library/lzma.rst
File Doc/library/lzma.rst (right):

http://bugs.python.org/review/17193/diff/7360/Doc/library/lzma.rst#newcode161
Doc/library/lzma.rst:161: :class:`LZMACompressor` object can be as high
as 800 MiB. For this reason,
On 2013/02/15 22:57:38, storchaka wrote:
> On 2013/02/15 22:17:02, ezio.melotti wrote:
> > Why is this MiB?
> 
> See for example xz manual. 800 MiB is the memory usage for the
compression with
> preset 9.

That doesn't mean that it's correct :)
800 MiB is equal to 838860800 bytes, and while it might indeed be the
exact value they used, it seems a bit arbitrary to me.

http://bugs.python.org/review/17193/


More information about the docs mailing list