summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-30 08:43:50 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-30 08:43:50 (GMT)
commitaf4337a0173d8ae9117b3c82c814ab2b9e635b35 (patch)
treefe9ce93831aae9f771d13d238ce25d4276c94dc4 /Objects
parentbbcb2814f2745ddd652480c3a932911680881544 (diff)
downloadcpython-af4337a0173d8ae9117b3c82c814ab2b9e635b35.zip
cpython-af4337a0173d8ae9117b3c82c814ab2b9e635b35.tar.gz
cpython-af4337a0173d8ae9117b3c82c814ab2b9e635b35.tar.bz2
Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't use them). (backport from rev. 52058)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/classobject.c2
-rw-r--r--Objects/typeobject.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index e739cc6..7680a3d 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -2256,6 +2256,8 @@ instancemethod_new(PyTypeObject* type, PyObject* args, PyObject *kw)
PyObject *self;
PyObject *classObj = NULL;
+ if (!_PyArg_NoKeywords("instancemethod", kw))
+ return NULL;
if (!PyArg_UnpackTuple(args, "instancemethod", 2, 3,
&func, &self, &classObj))
return NULL;
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 6edd455..4d99f7d 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -5762,6 +5762,8 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *obj = NULL;
PyTypeObject *obj_type = NULL;
+ if (!_PyArg_NoKeywords("super", kwds))
+ return -1;
if (!PyArg_ParseTuple(args, "O!|O:super", &PyType_Type, &type, &obj))
return -1;
if (obj == Py_None)