mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
#7035: improve docs of the various <method>_errors() functions, and give them docstrings.
This commit is contained in:
parent
030d65811f
commit
f4ffae2b2a
2 changed files with 42 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue