[Python-Dev] Re: [Patches] [Patch #102955] bltinmodule.c warning fix
Andrew Kuchling
akuchlin@mems-exchange.org
Thu, 21 Dec 2000 13:37:19 -0500
On Thu, Dec 21, 2000 at 02:44:19AM -0500, Tim Peters wrote:
>So we should say "8-bit string" or "Unicode string" when *only* one of those
>is allowable. So
OK... how about this patch?
Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.185
diff -u -r2.185 bltinmodule.c
--- bltinmodule.c 2000/12/20 15:07:34 2.185
+++ bltinmodule.c 2000/12/21 18:36:54
@@ -1524,13 +1524,14 @@
}
} 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;
}