diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-09-10 13:26:42 (GMT) |
---|---|---|
committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-09-10 13:26:42 (GMT) |
commit | 638601ec52858e19a4e3498c1057a62ee1481e65 (patch) | |
tree | 3d4f3e3b5faaa1def3cd753516f1964806a7f6cd /Doc/library | |
parent | f8693229f5650e464a5c112ad28fd4e14d55a7bd (diff) | |
download | cpython-638601ec52858e19a4e3498c1057a62ee1481e65.zip cpython-638601ec52858e19a4e3498c1057a62ee1481e65.tar.gz cpython-638601ec52858e19a4e3498c1057a62ee1481e65.tar.bz2 |
[3.6] Improve IncrementalEncoder documentation (GH-2746) (GH-3475)
getstate and setstate are instance methods, same as encode and reset.
(cherry picked from commit 30644dee0c14af6c1c61d44166a97cec8245300b)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/codecs.rst | 18 |
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: |