Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve doc of IncrementalEncoder #2746

Merged
merged 1 commit into from
Sep 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down