]> granicus.if.org Git - python/commitdiff
#6780: fix complex() constructor TypeError message
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 3 Dec 2010 16:51:33 +0000 (16:51 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 3 Dec 2010 16:51:33 +0000 (16:51 +0000)
Objects/complexobject.c

index c47e0d366140441d04ae073d1db6e3ef9ae54758..59997962cef123a194e97eab12c54762a71da301 100644 (file)
@@ -783,7 +783,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
     }
     else if (PyObject_AsCharBuffer(v, &s, &len)) {
         PyErr_SetString(PyExc_TypeError,
-                        "complex() arg is not a string");
+                        "complex() argument must be a string or a number");
         return NULL;
     }