summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-12-23 14:11:28 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-12-23 14:11:28 (GMT)
commitf07aad171a57dcc1e661d56660eb4ca51a2944d9 (patch)
tree80dc4010f63d1c4f679a22169cf8150cb4682df6 /Python
parent4e36d5885bbebf3ed087e828876e8463871d2038 (diff)
downloadcpython-f07aad171a57dcc1e661d56660eb4ca51a2944d9.zip
cpython-f07aad171a57dcc1e661d56660eb4ca51a2944d9.tar.gz
cpython-f07aad171a57dcc1e661d56660eb4ca51a2944d9.tar.bz2
CHange error messages for ord(), using "string" instead of "string or Unicode"
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 820bdaa..0df6cb4 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -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;
}