From: Zhiming Wang Date: Sun, 10 Sep 2017 06:09:55 +0000 (-0400) Subject: Improve IncrementalEncoder documentation (GH-2746) X-Git-Tag: v3.7.0a1~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30644dee0c14af6c1c61d44166a97cec8245300b;p=python Improve IncrementalEncoder documentation (GH-2746) getstate and setstate are instance methods, same as encode and reset. --- diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index 0ecd89ba75..b9c1868d59 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -554,19 +554,19 @@ define in order to be compatible with the Python codec registry. if necessary, to reset the encoder and to get the output. -.. method:: IncrementalEncoder.getstate() + .. method:: getstate() - Return the current state of the encoder which must be an integer. The - implementation should make sure that ``0`` is the most common state. (States - that are more complicated than integers can be converted into an integer by - marshaling/pickling the state and encoding the bytes of the resulting string - into an integer). + Return the current state of the encoder which must be an integer. The + implementation should make sure that ``0`` is the most common + state. (States that are more complicated than integers can be converted + into an integer by marshaling/pickling the state and encoding the bytes + of the resulting string into an integer). -.. method:: IncrementalEncoder.setstate(state) + .. method:: setstate(state) - Set the state of the encoder to *state*. *state* must be an encoder state - returned by :meth:`getstate`. + Set the state of the encoder to *state*. *state* must be an encoder state + returned by :meth:`getstate`. .. _incremental-decoder-objects: