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: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f961377e9959fd04a4351316386f15e019e89ebb;p=thirdparty%2FPython%2Fcpython.git #6780: fix complex() constructor TypeError message --- diff --git a/Objects/complexobject.c b/Objects/complexobject.c index c47e0d366140..59997962cef1 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; }