diff options
| author | Georg Brandl <georg@python.org> | 2006-09-30 08:43:35 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2006-09-30 08:43:35 +0000 |
| commit | adf8a1d0cb146f91ceff8963bd4b95dbe015a89f (patch) | |
| tree | fea9bc04b1fc1c1ff15f8f5e0d6b240787511c5f /Objects | |
| parent | 3b3a7fc75e342fbff7b429acba67e8b18b4cbfa5 (diff) | |
| download | cpython-git-adf8a1d0cb146f91ceff8963bd4b95dbe015a89f.tar.gz | |
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.c | 2 | ||||
| -rw-r--r-- | Objects/typeobject.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index bbd4c6d8f5..64f5243618 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -2211,6 +2211,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 d6e6780276..14d9c8e3fe 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -5706,6 +5706,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) |
