Lookup up the codec for the given encoding and return its encoder function. Raises a LookupError in case the encoding cannot be found.
(encoding)
| 968 | ### Helpers for codec lookup |
| 969 | |
| 970 | def getencoder(encoding): |
| 971 | |
| 972 | """ Lookup up the codec for the given encoding and return |
| 973 | its encoder function. |
| 974 | |
| 975 | Raises a LookupError in case the encoding cannot be found. |
| 976 | |
| 977 | """ |
| 978 | return lookup(encoding).encode |
| 979 | |
| 980 | def getdecoder(encoding): |
| 981 |