Lines Matching defs:errors
612 "decode($self, /, encoding=\'utf-8\', errors=\'strict\')\n"
619 " errors\n"
620 " The error handling scheme to use for the handling of decoding errors.\n"
621 " The default is \'strict\' meaning that decoding errors raise a\n"
631 const char *errors);
637 static const char * const _keywords[] = {"encoding", "errors", NULL};
642 const char *errors = NULL;
670 _PyArg_BadArgument("decode", "argument 'errors'", "str", args[1]);
674 errors = PyUnicode_AsUTF8AndSize(args[1], &errors_length);
675 if (errors == NULL) {
678 if (strlen(errors) != (size_t)errors_length) {
683 return_value = bytes_decode_impl(self, encoding, errors);
833 const char *errors);
839 static const char * const _keywords[] = {"source", "encoding", "errors", NULL};
847 const char *errors = NULL;
881 _PyArg_BadArgument("bytes", "argument 'errors'", "str", fastargs[2]);
885 errors = PyUnicode_AsUTF8AndSize(fastargs[2], &errors_length);
886 if (errors == NULL) {
889 if (strlen(errors) != (size_t)errors_length) {
894 return_value = bytes_new_impl(type, x, encoding, errors);