Lines Matching defs:errors
6 "encode($self, /, input, errors=None)\n"
11 "\'errors\' may be given to set a different error handling scheme. Default is\n"
12 "\'strict\' meaning that encoding errors raise a UnicodeEncodeError. Other possible\n"
22 const char *errors);
28 static const char * const _keywords[] = {"input", "errors", NULL};
33 const char *errors = NULL;
44 errors = NULL;
48 errors = PyUnicode_AsUTF8AndSize(args[1], &errors_length);
49 if (errors == NULL) {
52 if (strlen(errors) != (size_t)errors_length) {
58 _PyArg_BadArgument("encode", "argument 'errors'", "str or None", args[1]);
62 return_value = _multibytecodec_MultibyteCodec_encode_impl(self, input, errors);
69 "decode($self, /, input, errors=None)\n"
74 "\'errors\' may be given to set a different error handling scheme. Default is\n"
75 "\'strict\' meaning that encoding errors raise a UnicodeDecodeError. Other possible\n"
85 const char *errors);
91 static const char * const _keywords[] = {"input", "errors", NULL};
96 const char *errors = NULL;
113 errors = NULL;
117 errors = PyUnicode_AsUTF8AndSize(args[1], &errors_length);
118 if (errors == NULL) {
121 if (strlen(errors) != (size_t)errors_length) {
127 _PyArg_BadArgument("decode", "argument 'errors'", "str or None", args[1]);
131 return_value = _multibytecodec_MultibyteCodec_decode_impl(self, &input, errors);