![]() Is stored in the cache and returned to the caller. If no CodecInfo object isįound, a LookupError is raised. Looks up the codec info in the Python codec registry and returns aĮncodings are first looked up in the registry’s cache. The full details for each codec can also be looked up directly: codecs. ![]() decode ( obj, encoding = 'utf-8', errors = 'strict' ) ¶ĭecodes obj using the codec registered for encoding.ĭefault error handler is 'strict' meaning that decoding errors raise ValueError (or a more codec specific subclass, such as Theĭefault error handler is 'strict' meaning that encoding errors raise encode ( obj, encoding = 'utf-8', errors = 'strict' ) ¶Įncodes obj using the codec registered for encoding.Įrrors may be given to set the desired error handling scheme. The module defines the following functions for encoding and decoding withĪny codec: codecs. ![]() Text encodings, or with codecs that encode to Module features are restricted to use specifically with ![]() Custom codecs may encode and decode between arbitrary types, but some Most standard codecsĪre text encodings, which encode text to bytes,īut there are also codecs provided that encode text to text, and bytes toīytes. Manages the codec and error handling lookup process. This module defines base classes for standard Python codecs (encoders andĭecoders) and provides access to the internal Python codec registry, which Codecs - Codec registry and base classes ¶
0 Comments
Leave a Reply. |