mirror of
https://github.com/python/cpython.git
synced 2025-09-14 04:37:29 +00:00
Issue #23231: Document codecs.iterencode(), iterdecode() shortcomings
This commit is contained in:
parent
1cea56b597
commit
c73e9d844f
1 changed files with 9 additions and 0 deletions
|
@ -224,6 +224,10 @@ wider range of codecs when working with binary files:
|
||||||
The *errors* argument (as well as any
|
The *errors* argument (as well as any
|
||||||
other keyword argument) is passed through to the incremental encoder.
|
other keyword argument) is passed through to the incremental encoder.
|
||||||
|
|
||||||
|
This function requires that the codec accept text :class:`str` objects
|
||||||
|
to encode. Therefore it does not support bytes-to-bytes encoders such as
|
||||||
|
``base64_codec``.
|
||||||
|
|
||||||
|
|
||||||
.. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
|
.. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
|
||||||
|
|
||||||
|
@ -232,6 +236,11 @@ wider range of codecs when working with binary files:
|
||||||
The *errors* argument (as well as any
|
The *errors* argument (as well as any
|
||||||
other keyword argument) is passed through to the incremental decoder.
|
other keyword argument) is passed through to the incremental decoder.
|
||||||
|
|
||||||
|
This function requires that the codec accept :class:`bytes` objects
|
||||||
|
to decode. Therefore it does not support text-to-text encoders such as
|
||||||
|
``rot_13``, although ``rot_13`` may be used equivalently with
|
||||||
|
:func:`iterencode`.
|
||||||
|
|
||||||
|
|
||||||
The module also provides the following constants which are useful for reading
|
The module also provides the following constants which are useful for reading
|
||||||
and writing to platform dependent files:
|
and writing to platform dependent files:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue