[Python-checkins] cpython (merge 3.5 -> 3.6): Issue #23231: Merge codecs doc from 3.5 into 3.6

martin.panter python-checkins at python.org
Fri Oct 14 21:05:08 EDT 2016


https://hg.python.org/cpython/rev/0837940bcb9f
changeset:   104498:0837940bcb9f
branch:      3.6
parent:      104488:f2110f41012e
parent:      104497:402eba63650c
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Oct 15 01:04:08 2016 +0000
summary:
  Issue #23231: Merge codecs doc from 3.5 into 3.6

files:
  Doc/library/codecs.rst |  9 +++++++++
  1 files changed, 9 insertions(+), 0 deletions(-)


diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -224,6 +224,10 @@
    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 @@
    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:

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list