[Python-checkins] bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)

berkerpeksag webhook-mailer at python.org
Tue Jan 5 21:27:39 EST 2021


https://github.com/python/cpython/commit/a3ca6747f50efa2fe59caf516a26b0fd1912b8e8
commit: a3ca6747f50efa2fe59caf516a26b0fd1912b8e8
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: berkerpeksag <berker.peksag at gmail.com>
date: 2021-01-06T04:27:30+02:00
summary:

bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)

(cherry picked from commit 1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e)

Co-authored-by: Berker Peksag <berker.peksag at gmail.com>

files:
M Doc/library/codecs.rst
M Lib/codecs.py

diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index f071057293eec..6eb907afce3c6 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -694,7 +694,7 @@ compatible with the Python codec registry.
 
    .. method:: reset()
 
-      Flushes and resets the codec buffers used for keeping state.
+      Resets the codec buffers used for keeping internal state.
 
       Calling this method should ensure that the data on the output is put into
       a clean state that allows appending of new fresh data without having to
@@ -789,7 +789,7 @@ compatible with the Python codec registry.
 
    .. method:: reset()
 
-      Resets the codec buffers used for keeping state.
+      Resets the codec buffers used for keeping internal state.
 
       Note that no stream repositioning should take place. This method is
       primarily intended to be able to recover from decoding errors.
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 7f23e9775df80..d2edd148a290a 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -386,7 +386,7 @@ def writelines(self, list):
 
     def reset(self):
 
-        """ Flushes and resets the codec buffers used for keeping state.
+        """ Resets the codec buffers used for keeping internal state.
 
             Calling this method should ensure that the data on the
             output is put into a clean state, that allows appending
@@ -620,7 +620,7 @@ def readlines(self, sizehint=None, keepends=True):
 
     def reset(self):
 
-        """ Resets the codec buffers used for keeping state.
+        """ Resets the codec buffers used for keeping internal state.
 
             Note that no stream repositioning should take place.
             This method is primarily intended to be able to recover



More information about the Python-checkins mailing list