Skip to content

Commit 0514c59

Browse files
[3.14] gh-131885: Use real signatures in the zlib docs (GH-156179) (#156269)
(cherry picked from commit d5e560e) Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 5ac8f90 commit 0514c59

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
@@ -113,7 +113,7 @@ The available exception and functions in this module are:
113113
Added the *zdict* parameter and keyword argument support.
114114

115115

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

118118
.. index::
119119
single: Cyclic Redundancy Check
@@ -177,7 +177,7 @@ The available exception and functions in this module are:
177177
.. versionchanged:: 3.6
178178
*wbits* and *bufsize* can be used as keyword arguments.
179179

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

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

205205

206-
.. method:: Compress.compress(data)
206+
.. method:: Compress.compress(data, /)
207207

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

213213

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

216216
All pending input is processed, and a bytes object containing the remaining compressed
217217
output is returned. *mode* can be selected from the constants
@@ -266,7 +266,7 @@ Decompression objects support the following methods and attributes:
266266
.. versionadded:: 3.3
267267

268268

269-
.. method:: Decompress.decompress(data, max_length=0)
269+
.. method:: Decompress.decompress(data, /, max_length=0)
270270

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

287287

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

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

0 commit comments

Comments
 (0)