Commit f961377e authored by Victor Stinner's avatar Victor Stinner

#6780: fix complex() constructor TypeError message

parent b6a6f5f8
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment