[Python-checkins] python/dist/src/Lib codecs.py,1.26,1.27
doerwalter@users.sourceforge.net
doerwalter@users.sourceforge.net
Mon, 02 Sep 2002 06:14:32 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv19683/Lib
Modified Files:
codecs.py
Log Message:
PEP 293 implemention (from SF patch http://www.python.org/sf/432401)
Index: codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/codecs.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** codecs.py 4 Jun 2002 15:16:29 -0000 1.26
--- codecs.py 2 Sep 2002 13:14:30 -0000 1.27
***************
*** 21,25 ****
"BOM_LE", "BOM32_BE", "BOM32_LE", "BOM64_BE", "BOM64_LE",
"BOM_UTF8", "BOM_UTF16", "BOM_UTF16_LE", "BOM_UTF16_BE",
! "BOM_UTF32", "BOM_UTF32_LE", "BOM_UTF32_BE"]
### Constants
--- 21,28 ----
"BOM_LE", "BOM32_BE", "BOM32_LE", "BOM64_BE", "BOM64_LE",
"BOM_UTF8", "BOM_UTF16", "BOM_UTF16_LE", "BOM_UTF16_BE",
! "BOM_UTF32", "BOM_UTF32_LE", "BOM_UTF32_BE",
! "strict_errors", "ignore_errors", "replace_errors",
! "xmlcharrefreplace_errors",
! "register_error", "lookup_error"]
### Constants
***************
*** 632,635 ****
--- 635,646 ----
m[v] = None
return m
+
+ ### error handlers
+
+ strict_errors = lookup_error("strict")
+ ignore_errors = lookup_error("ignore")
+ replace_errors = lookup_error("replace")
+ xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace")
+ backslashreplace_errors = lookup_error("backslashreplace")
# Tell modulefinder that using codecs probably needs the encodings