[docs] Python 3 crc32 documentation clarifications (issue 22341)
vadmium+py at gmail.com
vadmium+py at gmail.com
Fri Mar 20 22:56:39 CET 2015
http://bugs.python.org/review/22341/diff/14133/Doc/library/binascii.rst
File Doc/library/binascii.rst (right):
http://bugs.python.org/review/22341/diff/14133/Doc/library/binascii.rst#newcode129
Doc/library/binascii.rst:129: crc = binascii.crc32(b"hello", 0)
On 2015/03/20 20:26:49, storchaka wrote:
> Why 0 was added? I think it is better to left only one argument, for
> demonstrating that the second argument is optional.
The first print() in the example already illustrates that the initial
CRC argument is optional.
Looking at this with fresh eyes, I think I would actually like to make
the second part look like the following, which is more like how you do
iterative CRC calculation in the real world:
crc = 0
crc = binascii.crc32(b"hello", crc)
crc = binascii.crc32(b" world", crc)
http://bugs.python.org/review/22341/
More information about the docs
mailing list