]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode...
authorBerker Peksag <berker.peksag@gmail.com>
Thu, 30 Jul 2015 20:27:13 +0000 (23:27 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Thu, 30 Jul 2015 20:27:13 +0000 (23:27 +0300)
It should StreamWriter for Codecs.encode() and StreamReader for Codec.decode().

Patch by Nick Weinhold.

Doc/library/codecs.rst
Lib/codecs.py

index feeb23628999c9fffc8c87b67a2060c8144ddd79..9529e66d07cbfdc86be8a80ee69567b3f616400c 100644 (file)
@@ -392,8 +392,8 @@ interfaces of the stateless encoder and decoder:
    handling.
 
    The method may not store state in the :class:`Codec` instance. Use
-   :class:`StreamCodec` for codecs which have to keep state in order to make
-   encoding/decoding efficient.
+   :class:`StreamWriter` for codecs which have to keep state in order to make
+   encoding efficient.
 
    The encoder must be able to handle zero length input and return an empty object
    of the output object type in this situation.
@@ -413,8 +413,8 @@ interfaces of the stateless encoder and decoder:
    handling.
 
    The method may not store state in the :class:`Codec` instance. Use
-   :class:`StreamCodec` for codecs which have to keep state in order to make
-   encoding/decoding efficient.
+   :class:`StreamReader` for codecs which have to keep state in order to make
+   decoding efficient.
 
    The decoder must be able to handle zero length input and return an empty object
    of the output object type in this situation.
index 12213e26f361613bb280c532ea578e0f1a2ec0bc..3d9be35ce5a53e56141348ac24b294697f04dbef 100644 (file)
@@ -138,8 +138,8 @@ class Codec:
             'strict' handling.
 
             The method may not store state in the Codec instance. Use
-            StreamCodec for codecs which have to keep state in order to
-            make encoding/decoding efficient.
+            StreamWriter for codecs which have to keep state in order to
+            make encoding efficient.
 
             The encoder must be able to handle zero length input and
             return an empty object of the output object type in this
@@ -161,8 +161,8 @@ class Codec:
             'strict' handling.
 
             The method may not store state in the Codec instance. Use
-            StreamCodec for codecs which have to keep state in order to
-            make encoding/decoding efficient.
+            StreamReader for codecs which have to keep state in order to
+            make decoding efficient.
 
             The decoder must be able to handle zero length input and
             return an empty object of the output object type in this