Skip to content

Commit c5e5058

Browse files
gh-131885: Use real signatures in the zlib docs
1 parent 228b1bf commit c5e5058

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Doc/library/zlib.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The available exception and functions in this module are:
2727
Exception raised on compression and decompression errors.
2828

2929

30-
.. function:: adler32(data[, value])
30+
.. function:: adler32(data, value=1, /)
3131

3232
Computes an Adler-32 checksum of *data*. (An Adler-32 checksum is almost as
3333
reliable as a CRC32 but can be computed much more quickly.) The result
@@ -127,7 +127,7 @@ The available exception and functions in this module are:
127127
Added the *zdict* parameter and keyword argument support.
128128

129129

130-
.. function:: crc32(data[, value])
130+
.. function:: crc32(data, value=0, /)
131131

132132
.. index::
133133
single: Cyclic Redundancy Check
@@ -205,7 +205,7 @@ The available exception and functions in this module are:
205205
.. versionchanged:: 3.6
206206
*wbits* and *bufsize* can be used as keyword arguments.
207207

208-
.. function:: decompressobj(wbits=MAX_WBITS[, zdict])
208+
.. function:: decompressobj(wbits=MAX_WBITS, zdict=b'')
209209

210210
Returns a decompression object, to be used for decompressing data streams that
211211
won't fit into memory at once.
@@ -231,15 +231,15 @@ The available exception and functions in this module are:
231231
Compression objects support the following methods:
232232

233233

234-
.. method:: Compress.compress(data)
234+
.. method:: Compress.compress(data, /)
235235

236236
Compress *data*, returning a bytes object containing compressed data for at least
237237
part of the data in *data*. This data should be concatenated to the output
238238
produced by any preceding calls to the :meth:`compress` method. Some input may
239239
be kept in internal buffers for later processing.
240240

241241

242-
.. method:: Compress.flush([mode])
242+
.. method:: Compress.flush(mode=Z_FINISH, /)
243243

244244
All pending input is processed, and a bytes object containing the remaining compressed
245245
output is returned. *mode* can be selected from the constants
@@ -294,7 +294,7 @@ Decompression objects support the following methods and attributes:
294294
.. versionadded:: 3.3
295295

296296

297-
.. method:: Decompress.decompress(data, max_length=0)
297+
.. method:: Decompress.decompress(data, /, max_length=0)
298298

299299
Decompress *data*, returning a bytes object containing the uncompressed data
300300
corresponding to at least part of the data in *string*. This data should be
@@ -318,7 +318,7 @@ Decompression objects support the following methods and attributes:
318318
*max_length* can be used as a keyword argument.
319319

320320

321-
.. method:: Decompress.flush([length])
321+
.. method:: Decompress.flush(length=DEF_BUF_SIZE, /)
322322

323323
All pending input is processed, and a bytes object containing the remaining
324324
uncompressed output is returned. After calling :meth:`flush`, the

0 commit comments

Comments
 (0)