]> granicus.if.org Git - python/commitdiff
CHange error messages for ord(), using "string" instead of "string or Unicode"
authorAndrew M. Kuchling <amk@amk.ca>
Sat, 23 Dec 2000 14:11:28 +0000 (14:11 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Sat, 23 Dec 2000 14:11:28 +0000 (14:11 +0000)
Python/bltinmodule.c

index 820bdaa4b76a309d9e57ddab54991dfd37d75b68..0df6cb4b1446f76a0951859e614d0dfc09bab1ea 100644 (file)
@@ -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;
 }