On this page
codecs.lookup_error
Prev: codecs.lookup | Up: codecs | Next: codecs.namereplace_errors
Rel: codecs.backslashreplace_errors, codecs.Codec, codecs.CodecInfo, codecs.decode
Ref: docs.python.org — codecs.lookup_error
Tags: #public #python3 #stdlib #codecs
Import
import codecs
from codecs import lookup_error
Signature & Overview
codecs.lookup_error(name, /)
Return the error handler for the specified error handling name or raise a LookupError, if no handler exists under this name.
Usage
import codecs
assert codecs.lookup_error("strict") is codecs.strict_errors
Gotchas
- Raises
LookupErrorif the error handler name is not registered.
REPL Inspect
from codecs import lookup_error
help(lookup_error)
Linked from
Related notes
- tuts/python3/stdlib_module/codecs/lookup Linked here; links to this page; shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs/namereplace_errors Linked here; links to this page; shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/codecs/backslashreplace_errors Linked here; shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs/Codec Linked here; shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs/CodecInfo Linked here; shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs/decode Linked here; shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs/encode shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs/EncodedFile shared tags: #codecs, #stdlib
- tuts/python3/stdlib_module/codecs/getdecoder shared tags: #codecs, #stdlib