diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-10-15 01:04:08 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-10-15 01:04:08 (GMT) |
commit | 36700e457840c2e80a99c2e3fe1eeaba336099e3 (patch) | |
tree | c87025a946fc19790192865f3b8f839e98f583c8 /Doc/library | |
parent | c972d1c76f703aaa2fa508e606891bd414f3d215 (diff) | |
parent | c73e9d844fcc9e91eff5ff933336aa46005bdefc (diff) | |
download | cpython-36700e457840c2e80a99c2e3fe1eeaba336099e3.zip cpython-36700e457840c2e80a99c2e3fe1eeaba336099e3.tar.gz cpython-36700e457840c2e80a99c2e3fe1eeaba336099e3.tar.bz2 |
Issue #23231: Merge codecs doc from 3.5 into 3.6
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/codecs.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index c6b6a56..aa1d123 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -224,6 +224,10 @@ wider range of codecs when working with binary files: 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 + to encode. Therefore it does not support bytes-to-bytes encoders such as + ``base64_codec``. + .. 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 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 and writing to platform dependent files: |