Skip to content

Commit 4b41b20

Browse files
gh-82663: Clarify codecs.iterdecode/encode docs (#136497)
Closes #82663
1 parent f1b8d01 commit 4b41b20

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
@@ -243,8 +243,8 @@ wider range of codecs when working with binary files:
243243
.. function:: iterencode(iterator, encoding, errors='strict', **kwargs)
244244

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

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

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

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

0 commit comments

Comments
 (0)