Orbits
1
|
Public Member Functions | |
def | __init__ |
def | decode |
def | reset |
def | getstate |
def | setstate |
Public Attributes | |
errors | |
An IncrementalDecoder decodes an input in multiple steps. The input can be passed piece by piece to the decode() method. The IncrementalDecoder remembers the state of the decoding process between calls to decode().
def codecs.IncrementalDecoder.__init__ | ( | self, | |
errors = 'strict' |
|||
) |
Creates a IncrementalDecoder instance. The IncrementalDecoder may use different error handling schemes by providing the errors keyword argument. See the module docstring for a list of possible values.
def codecs.IncrementalDecoder.decode | ( | self, | |
input, | |||
final = False |
|||
) |
Decodes input and returns the resulting object.
def codecs.IncrementalDecoder.getstate | ( | self | ) |
Return the current state of the decoder. This must be a (buffered_input, additional_state_info) tuple. buffered_input must be a bytes object containing bytes that were passed to decode() that have not yet been converted. additional_state_info must be a non-negative integer representing the state of the decoder WITHOUT yet having processed the contents of buffered_input. In the initial state and after reset(), getstate() must return (b"", 0).
def codecs.IncrementalDecoder.reset | ( | self | ) |
Resets the decoder to the initial state.
def codecs.IncrementalDecoder.setstate | ( | self, | |
state | |||
) |
Set the current state of the decoder. state must have been returned by getstate(). The effect of setstate((b"", 0)) must be equivalent to reset().
codecs.IncrementalDecoder.errors |
Creates a IncrementalDecoder instance. The IncrementalDecoder may use different error handling schemes by providing the errors keyword argument. See the module docstring for a list of possible values.
Copyright 2014 Google Inc. All rights reserved.