Skip to content

[3.9] bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716) #24136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions Lib/codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down