#7035: improve docs of the various <method>_errors() functions, and give them docstrings.

This commit is contained in:
Georg Brandl 2009-10-22 15:42:32 +00:00
parent 030d65811f
commit f4ffae2b2a
2 changed files with 42 additions and 20 deletions

View file

@ -774,7 +774,9 @@ static int _PyCodecRegistry_Init(void)
{
"strict_errors",
strict_errors,
METH_O
METH_O,
PyDoc_STR("Implements the 'strict' error handling, which "
"raises a UnicodeError on coding errors.")
}
},
#ifdef Py_USING_UNICODE
@ -783,7 +785,9 @@ static int _PyCodecRegistry_Init(void)
{
"ignore_errors",
ignore_errors,
METH_O
METH_O,
PyDoc_STR("Implements the 'ignore' error handling, which "
"ignores malformed data and continues.")
}
},
{
@ -791,7 +795,9 @@ static int _PyCodecRegistry_Init(void)
{
"replace_errors",
replace_errors,
METH_O
METH_O,
PyDoc_STR("Implements the 'replace' error handling, which "
"replaces malformed data with a replacement marker.")
}
},
{
@ -799,7 +805,10 @@ static int _PyCodecRegistry_Init(void)
{
"xmlcharrefreplace_errors",
xmlcharrefreplace_errors,
METH_O
METH_O,
PyDoc_STR("Implements the 'xmlcharrefreplace' error handling, "
"which replaces an unencodable character with the "
"appropriate XML character reference.")
}
},
{
@ -807,7 +816,10 @@ static int _PyCodecRegistry_Init(void)
{
"backslashreplace_errors",
backslashreplace_errors,
METH_O
METH_O,
PyDoc_STR("Implements the 'backslashreplace' error handling, "
"which replaces an unencodable character with a "
"backslashed escape sequence.")
}
}
#endif