Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 25091:0337dad8403e legacy-trunk
PEP 293 implemention (from SF patch http://www.python.org/sf/432401)
| author | Walter Dörwald <walter@livinglogic.de> |
|---|---|
| date | Mon, 02 Sep 2002 13:14:32 +0000 |
| parents | aa4503556339 |
| children | bc590beadf0b |
line wrap: on
line diff
--- a/Objects/stringobject.c Mon Sep 02 12:29:11 2002 +0000 +++ b/Objects/stringobject.c Mon Sep 02 13:14:32 2002 +0000 @@ -2468,7 +2468,9 @@ Encodes S using the codec registered for encoding. encoding defaults\n\ to the default encoding. errors may be given to set a different error\n\ handling scheme. Default is 'strict' meaning that encoding errors raise\n\ -a ValueError. Other possible values are 'ignore' and 'replace'."); +a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and\n\ +'xmlcharrefreplace' as well as any other name registered with\n\ +codecs.register_error that is able to handle UnicodeEncodeErrors."); static PyObject * string_encode(PyStringObject *self, PyObject *args) @@ -2487,7 +2489,9 @@ Decodes S using the codec registered for encoding. encoding defaults\n\ to the default encoding. errors may be given to set a different error\n\ handling scheme. Default is 'strict' meaning that encoding errors raise\n\ -a ValueError. Other possible values are 'ignore' and 'replace'."); +a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n\ +as well as any other name registerd with codecs.register_error that is\n\ +able to handle UnicodeDecodeErrors."); static PyObject * string_decode(PyStringObject *self, PyObject *args)
