Larry Hastings added the comment:
> * I have experimented in zlib_decompressobj, and I got good compact
> code, but wrong docstring ("decompressobj(wbits=None, zdict=None)").
> Needed a way to specify optional parameters without default Python
> values. Correct signature should be something like
> "decompressobj([wbits], [zdict])".
"decompressobj([wbits], [zdict])" isn't valid Python.
"decompressobj(wbits=None, zdict=None)" is; both wbits and zdict are
positional-or-keyword parameters with defaults. If you were writing
decompressobj() in Python, and you wanted to simulate its argument parsing as
closely as possible, you'd write what Argument Clinic generated.
You shouldn't use a default of "None" for wbits, though (and Argument Clinic
shouldn't have let you). How about_zlib.MAX_WBITS ?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20193>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com