@@ -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 ;
@@ -115,16 +116,16 @@ _codecs.encode
115116Encodes obj using the codec registered for encoding.
116117
117118The default encoding is 'utf-8'. errors may be given to set a
118- different error handling scheme. Default is 'strict' meaning that encoding
119- errors raise a ValueError. Other possible values are 'ignore', 'replace'
120- and 'backslashreplace' as well as any other name registered with
121- codecs.register_error that can handle ValueErrors.
119+ different error handling scheme. Default is 'strict' meaning that
120+ encoding errors raise a ValueError. Other possible values are 'ignore',
121+ 'replace' and 'backslashreplace' as well as any other name registered
122+ with codecs.register_error that can handle ValueErrors.
122123[clinic start generated code]*/
123124
124125static PyObject *
125126_codecs_encode_impl (PyObject * module , PyObject * obj , const char * encoding ,
126127 const char * errors )
127- /*[clinic end generated code: output=385148eb9a067c86 input=cd5b685040ff61f0 ]*/
128+ /*[clinic end generated code: output=385148eb9a067c86 input=e5271d443e391d7f ]*/
128129{
129130 if (encoding == NULL )
130131 encoding = PyUnicode_GetDefaultEncoding ();
@@ -142,16 +143,16 @@ _codecs.decode
142143Decodes obj using the codec registered for encoding.
143144
144145Default encoding is 'utf-8'. errors may be given to set a
145- different error handling scheme. Default is 'strict' meaning that encoding
146- errors raise a ValueError. Other possible values are 'ignore', 'replace'
147- and 'backslashreplace' as well as any other name registered with
148- codecs.register_error that can handle ValueErrors.
146+ different error handling scheme. Default is 'strict' meaning that
147+ encoding errors raise a ValueError. Other possible values are 'ignore',
148+ 'replace' and 'backslashreplace' as well as any other name registered
149+ with codecs.register_error that can handle ValueErrors.
149150[clinic start generated code]*/
150151
151152static PyObject *
152153_codecs_decode_impl (PyObject * module , PyObject * obj , const char * encoding ,
153154 const char * errors )
154- /*[clinic end generated code: output=679882417dc3a0bd input=7702c0cc2fa1add6 ]*/
155+ /*[clinic end generated code: output=679882417dc3a0bd input=3e6254628f9ca538 ]*/
155156{
156157 if (encoding == NULL )
157158 encoding = PyUnicode_GetDefaultEncoding ();
@@ -966,14 +967,15 @@ _codecs.register_error
966967Register the specified error handler under the name errors.
967968
968969handler must be a callable object, that will be called with an exception
969- instance containing information about the location of the encoding/decoding
970- error and must return a (replacement, new position) tuple.
970+ instance containing information about the location of the
971+ encoding/decoding error and must return a (replacement, new position)
972+ tuple.
971973[clinic start generated code]*/
972974
973975static PyObject *
974976_codecs_register_error_impl (PyObject * module , const char * errors ,
975977 PyObject * handler )
976- /*[clinic end generated code: output=fa2f7d1879b3067d input=5e6709203c2e33fe ]*/
978+ /*[clinic end generated code: output=fa2f7d1879b3067d input=5bea01dfe835d9d8 ]*/
977979{
978980 if (PyCodec_RegisterError (errors , handler ))
979981 return NULL ;
@@ -1011,13 +1013,13 @@ _codecs.lookup_error
10111013
10121014lookup_error(errors) -> handler
10131015
1014- Return the error handler for the specified error handling name or raise a
1015- LookupError, if no handler exists under this name.
1016+ Return the error handler for the specified error handling name or raise
1017+ a LookupError, if no handler exists under this name.
10161018[clinic start generated code]*/
10171019
10181020static PyObject *
10191021_codecs_lookup_error_impl (PyObject * module , const char * name )
1020- /*[clinic end generated code: output=087f05dc0c9a98cc input=4775dd65e6235aba ]*/
1022+ /*[clinic end generated code: output=087f05dc0c9a98cc input=86cfb6a7a9c67113 ]*/
10211023{
10221024 return PyCodec_LookupError (name );
10231025}
0 commit comments