Commit f4191a18 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

CHange error messages for ord(), using "string" instead of "string or Unicode"

parent 7078a8ed
......@@ -1524,13 +1524,14 @@ builtin_ord(PyObject *self, PyObject *args)
}
} else {
PyErr_Format(PyExc_TypeError,
"ord() expected string or Unicode character, " \
"ord() expected string of length 1, but " \
"%.200s found", obj->ob_type->tp_name);
return NULL;
}
PyErr_Format(PyExc_TypeError,
"ord() expected a character, length-%d string found",
"ord() expected a character, "
"but string of length %d found",
size);
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment