diff Objects/complexobject.c @ 66648:ae10282e7f4e

#6780: fix complex() constructor TypeError message
author Victor Stinner <victor.stinner@haypocalc.com>
date Fri, 03 Dec 2010 16:51:33 +0000
parents be8ae6b17539
children 7b6af56ee74d
line wrap: on
line diff
--- a/Objects/complexobject.c	Fri Dec 03 16:28:00 2010 +0000
+++ b/Objects/complexobject.c	Fri Dec 03 16:51:33 2010 +0000
@@ -783,7 +783,7 @@
     }
     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;
     }