@@ -54,14 +54,15 @@ _codecs.register
5454
5555Register a codec search function.
5656
57- Search functions are expected to take one argument, the encoding name in
58- all lower case letters, and either return None, or a tuple of functions
59- (encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object).
57+ Search functions are expected to take one argument, the encoding
58+ name in all lower case letters, and either return None, or a tuple
59+ of functions (encoder, decoder, stream_reader, stream_writer) (or
60+ a CodecInfo object).
6061[clinic start generated code]*/
6162
6263static PyObject *
6364_codecs_register (PyObject * module , PyObject * search_function )
64- /*[clinic end generated code: output=d1bf21e99db7d6d3 input=369578467955cae4 ]*/
65+ /*[clinic end generated code: output=d1bf21e99db7d6d3 input=2321d8c8c0420dfc ]*/
6566{
6667 if (PyCodec_Register (search_function ))
6768 return NULL ;
@@ -114,16 +115,16 @@ _codecs.encode
114115Encodes obj using the codec registered for encoding.
115116
116117The default encoding is 'utf-8'. errors may be given to set a
117- different error handling scheme. Default is 'strict' meaning that encoding
118- errors raise a ValueError. Other possible values are 'ignore', 'replace'
119- and 'backslashreplace' as well as any other name registered with
120- codecs.register_error that can handle ValueErrors.
118+ different error handling scheme. Default is 'strict' meaning that
119+ encoding errors raise a ValueError. Other possible values are 'ignore',
120+ 'replace' and 'backslashreplace' as well as any other name registered
121+ with codecs.register_error that can handle ValueErrors.
121122[clinic start generated code]*/
122123
123124static PyObject *
124125_codecs_encode_impl (PyObject * module , PyObject * obj , const char * encoding ,
125126 const char * errors )
126- /*[clinic end generated code: output=385148eb9a067c86 input=cd5b685040ff61f0 ]*/
127+ /*[clinic end generated code: output=385148eb9a067c86 input=e5271d443e391d7f ]*/
127128{
128129 if (encoding == NULL )
129130 encoding = PyUnicode_GetDefaultEncoding ();
@@ -141,16 +142,16 @@ _codecs.decode
141142Decodes obj using the codec registered for encoding.
142143
143144Default encoding is 'utf-8'. errors may be given to set a
144- different error handling scheme. Default is 'strict' meaning that encoding
145- errors raise a ValueError. Other possible values are 'ignore', 'replace'
146- and 'backslashreplace' as well as any other name registered with
147- codecs.register_error that can handle ValueErrors.
145+ different error handling scheme. Default is 'strict' meaning that
146+ encoding errors raise a ValueError. Other possible values are 'ignore',
147+ 'replace' and 'backslashreplace' as well as any other name registered
148+ with codecs.register_error that can handle ValueErrors.
148149[clinic start generated code]*/
149150
150151static PyObject *
151152_codecs_decode_impl (PyObject * module , PyObject * obj , const char * encoding ,
152153 const char * errors )
153- /*[clinic end generated code: output=679882417dc3a0bd input=7702c0cc2fa1add6 ]*/
154+ /*[clinic end generated code: output=679882417dc3a0bd input=3e6254628f9ca538 ]*/
154155{
155156 if (encoding == NULL )
156157 encoding = PyUnicode_GetDefaultEncoding ();
@@ -965,14 +966,15 @@ _codecs.register_error
965966Register the specified error handler under the name errors.
966967
967968handler must be a callable object, that will be called with an exception
968- instance containing information about the location of the encoding/decoding
969- error and must return a (replacement, new position) tuple.
969+ instance containing information about the location of the
970+ encoding/decoding error and must return a (replacement, new position)
971+ tuple.
970972[clinic start generated code]*/
971973
972974static PyObject *
973975_codecs_register_error_impl (PyObject * module , const char * errors ,
974976 PyObject * handler )
975- /*[clinic end generated code: output=fa2f7d1879b3067d input=5e6709203c2e33fe ]*/
977+ /*[clinic end generated code: output=fa2f7d1879b3067d input=5bea01dfe835d9d8 ]*/
976978{
977979 if (PyCodec_RegisterError (errors , handler ))
978980 return NULL ;
@@ -986,13 +988,13 @@ _codecs.lookup_error
986988
987989lookup_error(errors) -> handler
988990
989- Return the error handler for the specified error handling name or raise a
990- LookupError, if no handler exists under this name.
991+ Return the error handler for the specified error handling name or raise
992+ a LookupError, if no handler exists under this name.
991993[clinic start generated code]*/
992994
993995static PyObject *
994996_codecs_lookup_error_impl (PyObject * module , const char * name )
995- /*[clinic end generated code: output=087f05dc0c9a98cc input=4775dd65e6235aba ]*/
997+ /*[clinic end generated code: output=087f05dc0c9a98cc input=86cfb6a7a9c67113 ]*/
996998{
997999 return PyCodec_LookupError (name );
9981000}
0 commit comments