diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-11-25 11:57:17 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-11-25 11:57:17 (GMT) |
commit | 166ebc4e5dd09f005c6144b7568da83728b8b893 (patch) | |
tree | f6b9deb3cb72095ef55bcef31637f4aaafe95248 /Lib/codecs.py | |
parent | 6cecf68c7b51390429a2488846b1d0c29581987a (diff) | |
download | cpython-166ebc4e5dd09f005c6144b7568da83728b8b893.zip cpython-166ebc4e5dd09f005c6144b7568da83728b8b893.tar.gz cpython-166ebc4e5dd09f005c6144b7568da83728b8b893.tar.bz2 |
Issue #19676: Added the "namereplace" error handler.
Diffstat (limited to 'Lib/codecs.py')
-rw-r--r-- | Lib/codecs.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py index 9934517..85df89a 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -22,6 +22,7 @@ __all__ = ["register", "lookup", "open", "EncodedFile", "BOM", "BOM_BE", "BOM_UTF32", "BOM_UTF32_LE", "BOM_UTF32_BE", "strict_errors", "ignore_errors", "replace_errors", "xmlcharrefreplace_errors", + "backslashreplace_errors", "namereplace_errors", "register_error", "lookup_error"] ### Constants @@ -1085,6 +1086,7 @@ try: replace_errors = lookup_error("replace") xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace") backslashreplace_errors = lookup_error("backslashreplace") + namereplace_errors = lookup_error("namereplace") except LookupError: # In --disable-unicode builds, these error handler are missing strict_errors = None @@ -1092,6 +1094,7 @@ except LookupError: replace_errors = None xmlcharrefreplace_errors = None backslashreplace_errors = None + namereplace_errors = None # Tell modulefinder that using codecs probably needs the encodings # package |