mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Merged revisions 86882 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r86882 | georg.brandl | 2010-11-30 09:20:16 +0100 (Di, 30 Nov 2010) | 1 line Fix input type for zlib. ........
This commit is contained in:
parent
875c213806
commit
6d6fa47fb0
1 changed files with 2 additions and 2 deletions
|
@ -207,14 +207,14 @@ including: :mod:`zlib`, :mod:`gzip`, :mod:`bz2`, :mod:`zipfile` and
|
|||
:mod:`tarfile`. ::
|
||||
|
||||
>>> import zlib
|
||||
>>> s = 'witch which has which witches wrist watch'
|
||||
>>> s = b'witch which has which witches wrist watch'
|
||||
>>> len(s)
|
||||
41
|
||||
>>> t = zlib.compress(s)
|
||||
>>> len(t)
|
||||
37
|
||||
>>> zlib.decompress(t)
|
||||
'witch which has which witches wrist watch'
|
||||
b'witch which has which witches wrist watch'
|
||||
>>> zlib.crc32(s)
|
||||
226805979
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue