#7035: improve docs of the various <method>_errors() functions, and give them docstrings.
diff --git a/Python/codecs.c b/Python/codecs.c
index 4b0f4cb..3849cf9 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -774,7 +774,9 @@
{
"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 @@
{
"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 @@
{
"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 @@
{
"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 @@
{
"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