Skip to content

[3.13] gh-82663: Clarify codecs.iterdecode/encode docs (GH-136497) #136512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading