MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / iterdecode

Function iterdecode

tools/python-3.11.9-amd64/Lib/codecs.py:1056–1072  ·  view source on GitHub ↗

Decoding iterator. Decodes the input strings from the iterator using an IncrementalDecoder. errors and kwargs are passed through to the IncrementalDecoder constructor.

(iterator, encoding, errors='strict', **kwargs)

Source from the content-addressed store, hash-verified

1054 yield output
1055
1056def iterdecode(iterator, encoding, errors='strict', **kwargs):
1057 """
1058 Decoding iterator.
1059
1060 Decodes the input strings from the iterator using an IncrementalDecoder.
1061
1062 errors and kwargs are passed through to the IncrementalDecoder
1063 constructor.
1064 """
1065 decoder = getincrementaldecoder(encoding)(errors, **kwargs)
1066 for input in iterator:
1067 output = decoder.decode(input)
1068 if output:
1069 yield output
1070 output = decoder.decode(b"", True)
1071 if output:
1072 yield output
1073
1074### Helpers for charmap-based codecs
1075

Callers

nothing calls this directly

Calls 2

getincrementaldecoderFunction · 0.85
decodeMethod · 0.45

Tested by

no test coverage detected