Index: Objects/rangeobject.c =================================================================== --- Objects/rangeobject.c (Revision 53382) +++ Objects/rangeobject.c (Arbeitskopie) @@ -45,7 +45,7 @@ long ilow = 0, ihigh = 0, istep = 1; long n; - if (!_PyArg_NoKeywords("xrange()", kw)) + if (type == &PyRange_Type && !_PyArg_NoKeywords("xrange()", kw)) return NULL; if (PyTuple_Size(args) <= 1) { Index: Objects/bufferobject.c =================================================================== --- Objects/bufferobject.c (Revision 53382) +++ Objects/bufferobject.c (Arbeitskopie) @@ -233,7 +233,7 @@ Py_ssize_t offset = 0; Py_ssize_t size = Py_END_OF_BUFFER; - if (!_PyArg_NoKeywords("buffer()", kw)) + if (type == &PyBuffer_Type && !_PyArg_NoKeywords("buffer()", kw)) return NULL; if (!PyArg_ParseTuple(args, "O|nn:buffer", &ob, &offset, &size)) Index: Objects/sliceobject.c =================================================================== --- Objects/sliceobject.c (Revision 53382) +++ Objects/sliceobject.c (Arbeitskopie) @@ -194,7 +194,7 @@ start = stop = step = NULL; - if (!_PyArg_NoKeywords("slice()", kw)) + if (type == &PySlice_Type && !_PyArg_NoKeywords("slice()", kw)) return NULL; if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step)) Index: Objects/classobject.c =================================================================== --- Objects/classobject.c (Revision 53382) +++ Objects/classobject.c (Arbeitskopie) @@ -2258,7 +2258,8 @@ PyObject *self; PyObject *classObj = NULL; - if (!_PyArg_NoKeywords("instancemethod", kw)) + if (type == &PyMethod_Type && + !_PyArg_NoKeywords("instancemethod", kw)) return NULL; if (!PyArg_UnpackTuple(args, "instancemethod", 2, 3, &func, &self, &classObj)) Index: Modules/arraymodule.c =================================================================== --- Modules/arraymodule.c (Revision 53382) +++ Modules/arraymodule.c (Arbeitskopie) @@ -1797,7 +1797,7 @@ 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)) Index: Modules/_randommodule.c =================================================================== --- Modules/_randommodule.c (Revision 53382) +++ Modules/_randommodule.c (Arbeitskopie) @@ -481,7 +481,7 @@ RandomObject *self; PyObject *tmp; - if (!_PyArg_NoKeywords("Random()", kwds)) + if (type == &Random_Type && !_PyArg_NoKeywords("Random()", kwds)) return NULL; self = (RandomObject *)type->tp_alloc(type, 0); Index: Modules/operator.c =================================================================== --- Modules/operator.c (Revision 53382) +++ Modules/operator.c (Arbeitskopie) @@ -322,7 +322,8 @@ PyObject *item; Py_ssize_t nitems; - if (!_PyArg_NoKeywords("itemgetter()", kwds)) + if (type == &itemgetter_type && + !_PyArg_NoKeywords("itemgetter()", kwds)) return NULL; nitems = PyTuple_GET_SIZE(args); @@ -460,7 +461,8 @@ PyObject *attr; Py_ssize_t nattrs; - if (!_PyArg_NoKeywords("attrgetter()", kwds)) + if (type == &attrgetter_type && + !_PyArg_NoKeywords("attrgetter()", kwds)) return NULL; nattrs = PyTuple_GET_SIZE(args); Index: Modules/collectionsmodule.c =================================================================== --- Modules/collectionsmodule.c (Revision 53382) +++ Modules/collectionsmodule.c (Arbeitskopie) @@ -95,7 +95,7 @@ dequeobject *deque; block *b; - if (!_PyArg_NoKeywords("deque()", kwds)) + if (type == &deque_type && !_PyArg_NoKeywords("deque()", kwds)) return NULL; /* create dequeobject structure */ Index: Modules/itertoolsmodule.c =================================================================== --- Modules/itertoolsmodule.c (Revision 53382) +++ Modules/itertoolsmodule.c (Arbeitskopie) @@ -681,7 +681,7 @@ PyObject *saved; cycleobject *lz; - if (!_PyArg_NoKeywords("cycle()", kwds)) + if (type == &cycle_type && !_PyArg_NoKeywords("cycle()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "cycle", 1, 1, &iterable)) @@ -831,7 +831,7 @@ PyObject *it; dropwhileobject *lz; - if (!_PyArg_NoKeywords("dropwhile()", kwds)) + if (type == &dropwhile_type && !_PyArg_NoKeywords("dropwhile()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "dropwhile", 2, 2, &func, &seq)) @@ -975,7 +975,7 @@ PyObject *it; takewhileobject *lz; - if (!_PyArg_NoKeywords("takewhile()", kwds)) + if (type == &takewhile_type && !_PyArg_NoKeywords("takewhile()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "takewhile", 2, 2, &func, &seq)) @@ -1120,7 +1120,7 @@ Py_ssize_t numargs; isliceobject *lz; - if (!_PyArg_NoKeywords("islice()", kwds)) + if (type == &islice_type && !_PyArg_NoKeywords("islice()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "islice", 2, 4, &seq, &a1, &a2, &a3)) @@ -1311,7 +1311,7 @@ PyObject *it; starmapobject *lz; - if (!_PyArg_NoKeywords("starmap()", kwds)) + if (type == &starmap_type && !_PyArg_NoKeywords("starmap()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "starmap", 2, 2, &func, &seq)) @@ -1443,7 +1443,7 @@ imapobject *lz; Py_ssize_t numargs, i; - if (!_PyArg_NoKeywords("imap()", kwds)) + if (type == &imap_type && !_PyArg_NoKeywords("imap()", kwds)) return NULL; numargs = PyTuple_Size(args); @@ -1625,7 +1625,7 @@ Py_ssize_t i; PyObject *ittuple; - if (!_PyArg_NoKeywords("chain()", kwds)) + if (type == &chain_type && !_PyArg_NoKeywords("chain()", kwds)) return NULL; /* obtain iterators */ @@ -1768,7 +1768,7 @@ PyObject *it; ifilterobject *lz; - if (!_PyArg_NoKeywords("ifilter()", kwds)) + if (type == &ifilter_type && !_PyArg_NoKeywords("ifilter()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "ifilter", 2, 2, &func, &seq)) @@ -1912,7 +1912,8 @@ PyObject *it; ifilterfalseobject *lz; - if (!_PyArg_NoKeywords("ifilterfalse()", kwds)) + if (type == &ifilterfalse_type && + !_PyArg_NoKeywords("ifilterfalse()", kwds)) return NULL; if (!PyArg_UnpackTuple(args, "ifilterfalse", 2, 2, &func, &seq)) @@ -2054,7 +2055,7 @@ countobject *lz; Py_ssize_t cnt = 0; - if (!_PyArg_NoKeywords("count()", kwds)) + if (type == &count_type && !_PyArg_NoKeywords("count()", kwds)) return NULL; if (!PyArg_ParseTuple(args, "|n:count", &cnt)) @@ -2153,7 +2154,7 @@ PyObject *result; Py_ssize_t tuplesize = PySequence_Length(args); - if (!_PyArg_NoKeywords("izip()", kwds)) + if (type == &izip_type && !_PyArg_NoKeywords("izip()", kwds)) return NULL; /* args must be a tuple */ @@ -2336,7 +2337,7 @@ PyObject *element; Py_ssize_t cnt = -1; - if (!_PyArg_NoKeywords("repeat()", kwds)) + if (type == &repeat_type && !_PyArg_NoKeywords("repeat()", kwds)) return NULL; if (!PyArg_ParseTuple(args, "O|n:repeat", &element, &cnt))