Skip to content

Commit 30644de

Browse files
zmwangxMariatta
authored andcommitted
Improve IncrementalEncoder documentation (GH-2746)
getstate and setstate are instance methods, same as encode and reset.
1 parent c0c29df commit 30644de

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Doc/library/codecs.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -554,19 +554,19 @@ define in order to be compatible with the Python codec registry.
554554
if necessary, to reset the encoder and to get the output.
555555

556556

557-
.. method:: IncrementalEncoder.getstate()
557+
.. method:: getstate()
558558

559-
Return the current state of the encoder which must be an integer. The
560-
implementation should make sure that ``0`` is the most common state. (States
561-
that are more complicated than integers can be converted into an integer by
562-
marshaling/pickling the state and encoding the bytes of the resulting string
563-
into an integer).
559+
Return the current state of the encoder which must be an integer. The
560+
implementation should make sure that ``0`` is the most common
561+
state. (States that are more complicated than integers can be converted
562+
into an integer by marshaling/pickling the state and encoding the bytes
563+
of the resulting string into an integer).
564564

565565

566-
.. method:: IncrementalEncoder.setstate(state)
566+
.. method:: setstate(state)
567567

568-
Set the state of the encoder to *state*. *state* must be an encoder state
569-
returned by :meth:`getstate`.
568+
Set the state of the encoder to *state*. *state* must be an encoder state
569+
returned by :meth:`getstate`.
570570

571571

572572
.. _incremental-decoder-objects:

0 commit comments

Comments
 (0)