summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorZhiming Wang <zmwangx@gmail.com>2017-09-10 06:09:55 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-09-10 06:09:55 (GMT)
commit30644dee0c14af6c1c61d44166a97cec8245300b (patch)
tree5c68017f4461330407d3f213f18851513ed52fa9 /Doc
parentc0c29dff7940b7e7ecc1dd051080c5d5f9e42ba8 (diff)
downloadcpython-30644dee0c14af6c1c61d44166a97cec8245300b.zip
cpython-30644dee0c14af6c1c61d44166a97cec8245300b.tar.gz
cpython-30644dee0c14af6c1c61d44166a97cec8245300b.tar.bz2
Improve IncrementalEncoder documentation (GH-2746)
getstate and setstate are instance methods, same as encode and reset.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/codecs.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 0ecd89b..b9c1868 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: