MCPcopy Index your code
hub / github.com/python/cpython / getincrementalencoder

Function getincrementalencoder

Lib/codecs.py:995–1007  ·  view source on GitHub ↗

Lookup up the codec for the given encoding and return its IncrementalEncoder class or factory function. Raises a LookupError in case the encoding cannot be found or the codecs doesn't provide an incremental encoder.

(encoding)

Source from the content-addressed store, hash-verified

993 return lookup(encoding).decode
994
995def getincrementalencoder(encoding):
996
997 """ Lookup up the codec for the given encoding and return
998 its IncrementalEncoder class or factory function.
999
1000 Raises a LookupError in case the encoding cannot be found
1001 or the codecs doesn't provide an incremental encoder.
1002
1003 """
1004 encoder = lookup(encoding).incrementalencoder
1005 if encoder is None:
1006 raise LookupError(encoding)
1007 return encoder
1008
1009def getincrementaldecoder(encoding):
1010

Callers 1

iterencodeFunction · 0.85

Calls 1

lookupFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…