@@ -91,12 +91,12 @@ _codecs_lookup_impl(PyModuleDef *module, const char *encoding)
91
91
/*[clinic input]
92
92
_codecs.encode
93
93
obj: object
94
- encoding: str(c_default="NULL") = sys.getdefaultencoding()
94
+ encoding: str(c_default="NULL") = "utf-8"
95
95
errors: str(c_default="NULL") = "strict"
96
96
97
97
Encodes obj using the codec registered for encoding.
98
98
99
- encoding defaults to the default encoding. errors may be given to set a
99
+ The default encoding is 'utf-8' . errors may be given to set a
100
100
different error handling scheme. Default is 'strict' meaning that encoding
101
101
errors raise a ValueError. Other possible values are 'ignore', 'replace'
102
102
and 'backslashreplace' as well as any other name registered with
@@ -106,7 +106,7 @@ codecs.register_error that can handle ValueErrors.
106
106
static PyObject *
107
107
_codecs_encode_impl (PyModuleDef * module , PyObject * obj , const char * encoding ,
108
108
const char * errors )
109
- /*[clinic end generated code: output=5c073f62249c8d7c input=2440d769df020a0e ]*/
109
+ /*[clinic end generated code: output=5c073f62249c8d7c input=cd5b685040ff61f0 ]*/
110
110
{
111
111
if (encoding == NULL )
112
112
encoding = PyUnicode_GetDefaultEncoding ();
@@ -118,12 +118,12 @@ _codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding,
118
118
/*[clinic input]
119
119
_codecs.decode
120
120
obj: object
121
- encoding: str(c_default="NULL") = sys.getdefaultencoding()
121
+ encoding: str(c_default="NULL") = "utf-8"
122
122
errors: str(c_default="NULL") = "strict"
123
123
124
124
Decodes obj using the codec registered for encoding.
125
125
126
- encoding defaults to the default encoding . errors may be given to set a
126
+ Default encoding is 'utf-8' . errors may be given to set a
127
127
different error handling scheme. Default is 'strict' meaning that encoding
128
128
errors raise a ValueError. Other possible values are 'ignore', 'replace'
129
129
and 'backslashreplace' as well as any other name registered with
@@ -133,7 +133,7 @@ codecs.register_error that can handle ValueErrors.
133
133
static PyObject *
134
134
_codecs_decode_impl (PyModuleDef * module , PyObject * obj , const char * encoding ,
135
135
const char * errors )
136
- /*[clinic end generated code: output=c81cbf6189a7f878 input=a351e5f5baad1544 ]*/
136
+ /*[clinic end generated code: output=c81cbf6189a7f878 input=7702c0cc2fa1add6 ]*/
137
137
{
138
138
if (encoding == NULL )
139
139
encoding = PyUnicode_GetDefaultEncoding ();
0 commit comments