Python codecs Library getincrementalencoder and getincrementaldecoder














































Python codecs Library getincrementalencoder and getincrementaldecoder



Python codecs Library

The purpose of this module is Encoding and decoding i.e. conversion of the texts between different representations.
This module defines base classes for standard Python codecs (encoders and decoders) and provides access to the internal Python codec registry, which manages the codec and error handling lookup process.

The functions defined in this module are 
1. codecs.getincrementalencoder(encoding):
2. codecs.getincrementaldecoder(encoding):

The IncrementalEncoder  and IncrementalDecoder are the classes in python codecs library, These provide the basic interface for the incremental encoding and decoding. Encoding and Decoding the input is not done with one call to the stateless encoder or decoder function method of the incremental encoder or decoder . It keeps the track of the encoding and decoding process during method calls. Incremental encoder and decoder functions are joined calls to the stateless encode and decode functions

codecs.getincrementalencoder(encoding):

This function looks up the codecs for the given encoding and return its incremental encoder class or factory function.
It raises a LookupError in case the encoding cannot be found, or if the codec doesn't support an incremental encoder.

    

codecs.getincrementaldecoder(encoding):

This function looks up the codecs for the given encoding and return its incremental decoder class or the factory function.
Here also we receive the function as an object only, just like getincrementalencoder function.
It also raises a LookupError in case the encoding cannot be found, or if the codec doesn't support an incremental decoder.

    


More Articles of Arkaja Sharan:

Name Views Likes
Python codecs Library Error Handling schemes module functions 119 0
Python codecs Library Error Handler register_error and lookup_error functions 119 0
Python codecs Library Error Handlers 136 0
Python codecs Library open and EncodedFile functions 119 0
Python codecs Library iterencode and iterdecode functions 134 0
Python codecs Library register and unregister functions 102 0
Python codecs Library getreader and getwriter functions 119 0
Python codecs Library getincrementalencoder and getincrementaldecoder 103 0
Python codecs Library getencoder and getdecoder functions 113 0
Python Introduction to codecs Library 140 0
Python fcntl Library flock and lockf functions 122 0
Python fcntl Library fcntl and ioctl functions 140 0
Python Resource Library resource usage functions 123 0
Python Resource Library resource usage symbolic constants 105 0
Python Resource Library Resource Limit Functions 125 0
Python resource library resource limit symbolic constants 121 0
Python Introduction to Resource Library 130 0
Python stringprep Library in_table_d1 and in_table_d2 functions 116 0
Python stringprep Library in_table_c8 and in_table_c9 functions 111 0
Python stringprep Library in_table_c5 in_table_c6 and in_table_c7 functions 105 0
Python stringprep Library in_table_c3 and in_table_c4 functions 110 0
Python stringprep library in_table_c21 in_table_c22 and in_table_c21_c22 116 0
Python stringprep library functions in_table_c11 in_table_c12 and in_table_c11_c12 112 0
Python Introduction to stringprep Library 124 0
Python unicodedata library is_normalized unidata_version and ucd_3_2_0 111 0
Python Unicodedata Library functions normalize and decomposition 165 0
Python Unicodedata Library functions east_asian_width and mirrored 110 1
Python Unicodedata Library category bidirectional and combining functions 163 0
Introduction to Unicodedata library lookup and name functions 112 0
Unicode Library decimal digit and numeric functions 118 0
Introduction to Unicode Data library 0 0

Comments