Skip to content

Commit a3ca674

Browse files
bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)
(cherry picked from commit 1a9f51e) Co-authored-by: Berker Peksag <[email protected]>
1 parent 77d5471 commit a3ca674

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/library/codecs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ compatible with the Python codec registry.
694694

695695
.. method:: reset()
696696

697-
Flushes and resets the codec buffers used for keeping state.
697+
Resets the codec buffers used for keeping internal state.
698698

699699
Calling this method should ensure that the data on the output is put into
700700
a clean state that allows appending of new fresh data without having to
@@ -789,7 +789,7 @@ compatible with the Python codec registry.
789789

790790
.. method:: reset()
791791

792-
Resets the codec buffers used for keeping state.
792+
Resets the codec buffers used for keeping internal state.
793793

794794
Note that no stream repositioning should take place. This method is
795795
primarily intended to be able to recover from decoding errors.

Lib/codecs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def writelines(self, list):
386386

387387
def reset(self):
388388

389-
""" Flushes and resets the codec buffers used for keeping state.
389+
""" Resets the codec buffers used for keeping internal state.
390390
391391
Calling this method should ensure that the data on the
392392
output is put into a clean state, that allows appending
@@ -620,7 +620,7 @@ def readlines(self, sizehint=None, keepends=True):
620620

621621
def reset(self):
622622

623-
""" Resets the codec buffers used for keeping state.
623+
""" Resets the codec buffers used for keeping internal state.
624624
625625
Note that no stream repositioning should take place.
626626
This method is primarily intended to be able to recover

0 commit comments

Comments
 (0)