From: Victor Stinner Date: Fri, 3 Dec 2010 16:51:33 +0000 (+0000) Subject: #6780: fix complex() constructor TypeError message X-Git-Tag: v3.2b1~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f961377e9959fd04a4351316386f15e019e89ebb;p=python #6780: fix complex() constructor TypeError message --- diff --git a/Objects/complexobject.c b/Objects/complexobject.c index c47e0d3661..59997962ce 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -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; }