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)
| 1059 | yield output |
| 1060 | |
| 1061 | def iterdecode(iterator, encoding, errors='strict', **kwargs): |
| 1062 | """ |
| 1063 | Decoding iterator. |
| 1064 | |
| 1065 | Decodes the input strings from the iterator using an IncrementalDecoder. |
| 1066 | |
| 1067 | errors and kwargs are passed through to the IncrementalDecoder |
| 1068 | constructor. |
| 1069 | """ |
| 1070 | decoder = getincrementaldecoder(encoding)(errors, **kwargs) |
| 1071 | for input in iterator: |
| 1072 | output = decoder.decode(input) |
| 1073 | if output: |
| 1074 | yield output |
| 1075 | output = decoder.decode(b"", True) |
| 1076 | if output: |
| 1077 | yield output |
| 1078 | |
| 1079 | ### Helpers for charmap-based codecs |
| 1080 |
nothing calls this directly
no test coverage detected
searching dependent graphs…