summaryrefslogtreecommitdiffstats
path: root/Doc/library/binascii.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-01-05 10:22:04 (GMT)
committerGeorg Brandl <georg@python.org>2010-01-05 10:22:04 (GMT)
commitede6c2aff6f2bf8842147ca286493e06ac0a99b0 (patch)
tree6dbb996deb2042c8f3aeb9310923c38a0c6f1257 /Doc/library/binascii.rst
parent7de0a6e04cb935e1665b82804f08457c924c6a5d (diff)
downloadcpython-ede6c2aff6f2bf8842147ca286493e06ac0a99b0.zip
cpython-ede6c2aff6f2bf8842147ca286493e06ac0a99b0.tar.gz
cpython-ede6c2aff6f2bf8842147ca286493e06ac0a99b0.tar.bz2
Assorted doc fixes by Florent.
Diffstat (limited to 'Doc/library/binascii.rst')
-rw-r--r--Doc/library/binascii.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst
index c42f81f..2f7851a 100644
--- a/Doc/library/binascii.rst
+++ b/Doc/library/binascii.rst
@@ -109,11 +109,11 @@ The :mod:`binascii` module defines the following functions:
use as a checksum algorithm, it is not suitable for use as a general hash
algorithm. Use as follows::
- print(binascii.crc32("hello world"))
+ print(binascii.crc32(b"hello world"))
# Or, in two pieces:
- crc = binascii.crc32("hello")
- crc = binascii.crc32(" world", crc) & 0xffffffff
- print('crc32 = 0x%08x' % crc)
+ crc = binascii.crc32(b"hello")
+ crc = binascii.crc32(b" world", crc) & 0xffffffff
+ print('crc32 = {:#010x}'.format(crc))
.. note::
To generate the same numeric value across all Python versions and