summaryrefslogtreecommitdiffstats
path: root/Modules/operator.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/operator.c')
-rw-r--r--Modules/operator.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/operator.c b/Modules/operator.c
index 938c5e5..4e1e517 100644
--- a/Modules/operator.c
+++ b/Modules/operator.c
@@ -269,6 +269,9 @@ itemgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *item;
int nitems;
+ if (!_PyArg_NoKeywords("itemgetter()", kwds))
+ return NULL;
+
nitems = PyTuple_GET_SIZE(args);
if (nitems <= 1) {
if (!PyArg_UnpackTuple(args, "itemgetter", 1, 1, &item))
@@ -405,6 +408,9 @@ attrgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *attr;
int nattrs;
+ if (!_PyArg_NoKeywords("attrgetter()", kwds))
+ return NULL;
+
nattrs = PyTuple_GET_SIZE(args);
if (nattrs <= 1) {
if (!PyArg_UnpackTuple(args, "attrgetter", 1, 1, &attr))