Lookup up the codec for the given encoding and return its IncrementalDecoder class or factory function. Raises a LookupError in case the encoding cannot be found or the codecs doesn't provide an incremental decoder.
(encoding)
| 1002 | return encoder |
| 1003 | |
| 1004 | def getincrementaldecoder(encoding): |
| 1005 | |
| 1006 | """ Lookup up the codec for the given encoding and return |
| 1007 | its IncrementalDecoder class or factory function. |
| 1008 | |
| 1009 | Raises a LookupError in case the encoding cannot be found |
| 1010 | or the codecs doesn't provide an incremental decoder. |
| 1011 | |
| 1012 | """ |
| 1013 | decoder = lookup(encoding).incrementaldecoder |
| 1014 | if decoder is None: |
| 1015 | raise LookupError(encoding) |
| 1016 | return decoder |
| 1017 | |
| 1018 | def getreader(encoding): |
| 1019 |