#6780: fix complex() constructor TypeError message
This commit is contained in:
parent
b6a6f5f886
commit
f961377e99
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue