[docs] zlib.compressobj doesn't accept memlevel argument
anonyme couard
anonyme.couard at gmail.com
Tue Jan 8 15:29:27 CET 2013
when trying to use
http://docs.python.org/3/library/zlib.html#zlib.compressobj
with the folowwing code
import zlib
page1= b"page1"
page2 = b"page2"
c =
zlib.compressobj(level=9,zdict=page1,method=zlib.DEFLATED,wbits=15,strategy=zlib.Z_DEFAULT_STRATEGY,memlevel=9)
print(len(c.compress(page2)+c.flush()))
I have the following traceback
Original exception was:
Traceback (most recent call last):
File "test.py", line 4, in <module>
c =
zlib.compressobj(level=9,zdict=page1,method=zlib.DEFLATED,wbits=15,strategy=zlib.Z_DEFAULT_STRATEGY,memlevel=9)
TypeError: 'memlevel' is an invalid keyword argument for this function
I think that memlevel was replaced by wbits at a point and was not
replaced in the documentation
my suggestion: remove memlevel
More information about the docs
mailing list