diff Python/bltinmodule.c @ 33261:1cf7d7225a99 legacy-trunk

Patch #1015021: Stop claiming that coerce can return None. Will backport to 2.3.
author Martin v. Löwis <martin@v.loewis.de>
date Wed, 25 Aug 2004 10:42:41 +0000
parents ce016d0ec701
children 860e0fd2fee8 cc9ce6837ea9
line wrap: on
line diff
--- a/Python/bltinmodule.c	Wed Aug 25 06:24:58 2004 +0000
+++ b/Python/bltinmodule.c	Wed Aug 25 10:42:41 2004 +0000
@@ -322,11 +322,11 @@
 }
 
 PyDoc_STRVAR(coerce_doc,
-"coerce(x, y) -> None or (x1, y1)\n\
+"coerce(x, y) -> (x1, y1)\n\
 \n\
-When x and y can be coerced to values of the same type, return a tuple\n\
-containing the coerced values.  When they can't be coerced, return None.");
-
+Return a tuple consisting of the two numeric arguments converted to\n\
+a common type, using the same rules as used by arithmetic operations.\n\
+If coercion is not possible, raise TypeError.");
 
 static PyObject *
 builtin_compile(PyObject *self, PyObject *args)