Skip to content

Commit 81d1986

Browse files
[3.13] gh-82663: Clarify codecs.iterdecode/encode docs (GH-136497) (#136512)
gh-82663: Clarify `codecs.iterdecode/encode` docs (GH-136497) Closes GH-82663 (cherry picked from commit 4b41b20) Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 15e9c3b commit 81d1986

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/codecs.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ wider range of codecs when working with binary files:
239239
.. function:: iterencode(iterator, encoding, errors='strict', **kwargs)
240240

241241
Uses an incremental encoder to iteratively encode the input provided by
242-
*iterator*. This function is a :term:`generator`.
243-
The *errors* argument (as well as any
242+
*iterator*. *iterator* must yield :class:`str` objects.
243+
This function is a :term:`generator`. The *errors* argument (as well as any
244244
other keyword argument) is passed through to the incremental encoder.
245245

246246
This function requires that the codec accept text :class:`str` objects
@@ -251,8 +251,8 @@ wider range of codecs when working with binary files:
251251
.. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
252252

253253
Uses an incremental decoder to iteratively decode the input provided by
254-
*iterator*. This function is a :term:`generator`.
255-
The *errors* argument (as well as any
254+
*iterator*. *iterator* must yield :class:`bytes` objects.
255+
This function is a :term:`generator`. The *errors* argument (as well as any
256256
other keyword argument) is passed through to the incremental decoder.
257257

258258
This function requires that the codec accept :class:`bytes` objects

0 commit comments

Comments
 (0)