Lines Matching defs:errors
133 "encode($self, /, encoding=\'utf-8\', errors=\'strict\')\n"
140 " errors\n"
141 " The error handling scheme to use for encoding errors.\n"
142 " The default is \'strict\' meaning that encoding errors raise a\n"
151 unicode_encode_impl(PyObject *self, const char *encoding, const char *errors);
157 static const char * const _keywords[] = {"encoding", "errors", NULL};
162 const char *errors = NULL;
190 _PyArg_BadArgument("encode", "argument 'errors'", "str", args[1]);
194 errors = PyUnicode_AsUTF8AndSize(args[1], &errors_length);
195 if (errors == NULL) {
198 if (strlen(errors) != (size_t)errors_length) {
203 return_value = unicode_encode_impl(self, encoding, errors);
1290 const char *errors);
1296 static const char * const _keywords[] = {"object", "encoding", "errors", NULL};
1304 const char *errors = NULL;
1338 _PyArg_BadArgument("str", "argument 'errors'", "str", fastargs[2]);
1342 errors = PyUnicode_AsUTF8AndSize(fastargs[2], &errors_length);
1343 if (errors == NULL) {
1346 if (strlen(errors) != (size_t)errors_length) {
1351 return_value = unicode_new_impl(type, x, encoding, errors);