#6780: fix complex() constructor TypeError message

This commit is contained in:
Victor Stinner 2010-12-03 16:51:33 +00:00
parent b6a6f5f886
commit f961377e99
1 changed files with 1 additions and 1 deletions

View 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;
}