diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-08-09 09:25:07 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-08-09 09:25:07 (GMT) |
| commit | 224d403050c1fc8a8345c802d50eaaeb2fdadeae (patch) | |
| tree | f58ae7e3904331d3598e17af267dafb5824ded0e /Modules/_codecsmodule.c | |
| parent | 455b5092a1b60cc6d14c4d48729ec5c16e274df1 (diff) | |
| parent | c97a962e089670a1d38d8676ebbc3f1801dd3111 (diff) | |
| download | cpython-224d403050c1fc8a8345c802d50eaaeb2fdadeae.zip cpython-224d403050c1fc8a8345c802d50eaaeb2fdadeae.tar.gz cpython-224d403050c1fc8a8345c802d50eaaeb2fdadeae.tar.bz2 | |
Issue #24824: Signatures of codecs.encode() and codecs.decode() now are
compatible with pydoc.
Diffstat (limited to 'Modules/_codecsmodule.c')
| -rw-r--r-- | Modules/_codecsmodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c index cf67c46..7575773 100644 --- a/Modules/_codecsmodule.c +++ b/Modules/_codecsmodule.c @@ -91,12 +91,12 @@ _codecs_lookup_impl(PyModuleDef *module, const char *encoding) /*[clinic input] _codecs.encode obj: object - encoding: str(c_default="NULL") = sys.getdefaultencoding() + encoding: str(c_default="NULL") = "utf-8" errors: str(c_default="NULL") = "strict" Encodes obj using the codec registered for encoding. -encoding defaults to the default encoding. errors may be given to set a +The default encoding is 'utf-8'. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a ValueError. Other possible values are 'ignore', 'replace' and 'backslashreplace' as well as any other name registered with @@ -106,7 +106,7 @@ codecs.register_error that can handle ValueErrors. static PyObject * _codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding, const char *errors) -/*[clinic end generated code: output=5c073f62249c8d7c input=2440d769df020a0e]*/ +/*[clinic end generated code: output=5c073f62249c8d7c input=cd5b685040ff61f0]*/ { if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); @@ -118,12 +118,12 @@ _codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding, /*[clinic input] _codecs.decode obj: object - encoding: str(c_default="NULL") = sys.getdefaultencoding() + encoding: str(c_default="NULL") = "utf-8" errors: str(c_default="NULL") = "strict" Decodes obj using the codec registered for encoding. -encoding defaults to the default encoding. errors may be given to set a +Default encoding is 'utf-8'. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a ValueError. Other possible values are 'ignore', 'replace' and 'backslashreplace' as well as any other name registered with @@ -133,7 +133,7 @@ codecs.register_error that can handle ValueErrors. static PyObject * _codecs_decode_impl(PyModuleDef *module, PyObject *obj, const char *encoding, const char *errors) -/*[clinic end generated code: output=c81cbf6189a7f878 input=a351e5f5baad1544]*/ +/*[clinic end generated code: output=c81cbf6189a7f878 input=7702c0cc2fa1add6]*/ { if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); |
