https://github.com/python/cpython/commit/81d1986297fce5cab5150c21df51f0fc8118667f
commit: 81d1986297fce5cab5150c21df51f0fc8118667f
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: malemburg <m...@lemburg.com>
date: 2025-07-10T17:41:27+02:00
summary:

[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 4b41b2043b110a38616ff86ddb3f065ae7f15c3e)

Co-authored-by: Stan Ulbrych <89152624+stanfromirel...@users.noreply.github.com>

files:
M Doc/library/codecs.rst

diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 437289c880c852..a8f8c884d218a6 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -239,8 +239,8 @@ wider range of codecs when working with binary files:
 .. function:: iterencode(iterator, encoding, errors='strict', **kwargs)
 
    Uses an incremental encoder to iteratively encode the input provided by
-   *iterator*. This function is a :term:`generator`.
-   The *errors* argument (as well as any
+   *iterator*. *iterator* must yield :class:`str` objects.
+   This function is a :term:`generator`. The *errors* argument (as well as any
    other keyword argument) is passed through to the incremental encoder.
 
    This function requires that the codec accept text :class:`str` objects
@@ -251,8 +251,8 @@ wider range of codecs when working with binary files:
 .. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
 
    Uses an incremental decoder to iteratively decode the input provided by
-   *iterator*. This function is a :term:`generator`.
-   The *errors* argument (as well as any
+   *iterator*. *iterator* must yield :class:`bytes` objects.
+   This function is a :term:`generator`. The *errors* argument (as well as any
    other keyword argument) is passed through to the incremental decoder.
 
    This function requires that the codec accept :class:`bytes` objects

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to