@@ -55,14 +55,15 @@ _codecs.register
5555
5656Register a codec search function.
5757
58- Search functions are expected to take one argument, the encoding name in
59- all lower case letters, and either return None, or a tuple of functions
60- (encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object).
58+ Search functions are expected to take one argument, the encoding
59+ name in all lower case letters, and either return None, or a tuple
60+ of functions (encoder, decoder, stream_reader, stream_writer) (or
61+ a CodecInfo object).
6162[clinic start generated code]*/
6263
6364static PyObject *
6465_codecs_register (PyObject * module , PyObject * search_function )
65- /*[clinic end generated code: output=d1bf21e99db7d6d3 input=369578467955cae4 ]*/
66+ /*[clinic end generated code: output=d1bf21e99db7d6d3 input=2321d8c8c0420dfc ]*/
6667{
6768 if (PyCodec_Register (search_function ))
6869 return NULL ;
@@ -116,16 +117,16 @@ _codecs.encode
116117Encodes obj using the codec registered for encoding.
117118
118119The default encoding is 'utf-8'. errors may be given to set a
119- different error handling scheme. Default is 'strict' meaning that encoding
120- errors raise a ValueError. Other possible values are 'ignore', 'replace'
121- and 'backslashreplace' as well as any other name registered with
122- codecs.register_error that can handle ValueErrors.
120+ different error handling scheme. Default is 'strict' meaning that
121+ encoding errors raise a ValueError. Other possible values are 'ignore',
122+ 'replace' and 'backslashreplace' as well as any other name registered
123+ with codecs.register_error that can handle ValueErrors.
123124[clinic start generated code]*/
124125
125126static PyObject *
126127_codecs_encode_impl (PyObject * module , PyObject * obj , const char * encoding ,
127128 const char * errors )
128- /*[clinic end generated code: output=385148eb9a067c86 input=cd5b685040ff61f0 ]*/
129+ /*[clinic end generated code: output=385148eb9a067c86 input=e5271d443e391d7f ]*/
129130{
130131 if (encoding == NULL )
131132 encoding = PyUnicode_GetDefaultEncoding ();
@@ -143,16 +144,16 @@ _codecs.decode
143144Decodes obj using the codec registered for encoding.
144145
145146Default encoding is 'utf-8'. errors may be given to set a
146- different error handling scheme. Default is 'strict' meaning that encoding
147- errors raise a ValueError. Other possible values are 'ignore', 'replace'
148- and 'backslashreplace' as well as any other name registered with
149- codecs.register_error that can handle ValueErrors.
147+ different error handling scheme. Default is 'strict' meaning that
148+ encoding errors raise a ValueError. Other possible values are 'ignore',
149+ 'replace' and 'backslashreplace' as well as any other name registered
150+ with codecs.register_error that can handle ValueErrors.
150151[clinic start generated code]*/
151152
152153static PyObject *
153154_codecs_decode_impl (PyObject * module , PyObject * obj , const char * encoding ,
154155 const char * errors )
155- /*[clinic end generated code: output=679882417dc3a0bd input=7702c0cc2fa1add6 ]*/
156+ /*[clinic end generated code: output=679882417dc3a0bd input=3e6254628f9ca538 ]*/
156157{
157158 if (encoding == NULL )
158159 encoding = PyUnicode_GetDefaultEncoding ();
@@ -962,14 +963,15 @@ _codecs.register_error
962963Register the specified error handler under the name errors.
963964
964965handler must be a callable object, that will be called with an exception
965- instance containing information about the location of the encoding/decoding
966- error and must return a (replacement, new position) tuple.
966+ instance containing information about the location of the
967+ encoding/decoding error and must return a (replacement, new position)
968+ tuple.
967969[clinic start generated code]*/
968970
969971static PyObject *
970972_codecs_register_error_impl (PyObject * module , const char * errors ,
971973 PyObject * handler )
972- /*[clinic end generated code: output=fa2f7d1879b3067d input=5e6709203c2e33fe ]*/
974+ /*[clinic end generated code: output=fa2f7d1879b3067d input=5bea01dfe835d9d8 ]*/
973975{
974976 if (PyCodec_RegisterError (errors , handler ))
975977 return NULL ;
@@ -1007,13 +1009,13 @@ _codecs.lookup_error
10071009
10081010lookup_error(errors) -> handler
10091011
1010- Return the error handler for the specified error handling name or raise a
1011- LookupError, if no handler exists under this name.
1012+ Return the error handler for the specified error handling name or raise
1013+ a LookupError, if no handler exists under this name.
10121014[clinic start generated code]*/
10131015
10141016static PyObject *
10151017_codecs_lookup_error_impl (PyObject * module , const char * name )
1016- /*[clinic end generated code: output=087f05dc0c9a98cc input=4775dd65e6235aba ]*/
1018+ /*[clinic end generated code: output=087f05dc0c9a98cc input=86cfb6a7a9c67113 ]*/
10171019{
10181020 return PyCodec_LookupError (name );
10191021}
0 commit comments