Bug #1486663: don't reject keyword arguments for subclasses of builtin

types.
This commit is contained in:
Georg Brandl 2007-01-21 10:28:43 +00:00
parent aef4c6bc00
commit b84c13792d
9 changed files with 62 additions and 16 deletions

View file

@ -1797,7 +1797,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *initial = NULL, *it = NULL;
struct arraydescr *descr;
if (!_PyArg_NoKeywords("array.array()", kwds))
if (type == &Arraytype && !_PyArg_NoKeywords("array.array()", kwds))
return NULL;
if (!PyArg_ParseTuple(args, "c|O:array", &c, &initial))