From a3ca6747f50efa2fe59caf516a26b0fd1912b8e8 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 5 Jan 2021 18:27:30 -0800 Subject: bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716) (cherry picked from commit 1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e) Co-authored-by: Berker Peksag --- Doc/library/codecs.rst | 4 ++-- Lib/codecs.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index f071057..6eb907a 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 7f23e97..d2edd14 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -386,7 +386,7 @@ class StreamWriter(Codec): 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 @@ class StreamReader(Codec): 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 -- cgit v0.12