diff options
author | Georg Brandl <georg@python.org> | 2005-08-26 06:42:30 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2005-08-26 06:42:30 (GMT) |
commit | 02c42871cf73365dc5b6915cac2b017b2b90c81f (patch) | |
tree | a85d3fb2fc3682c2a149d213f5cf9a378868abea /Modules/_randommodule.c | |
parent | bd77da6dab9d41ef246febf54c7928ce4496dd49 (diff) | |
download | cpython-02c42871cf73365dc5b6915cac2b017b2b90c81f.zip cpython-02c42871cf73365dc5b6915cac2b017b2b90c81f.tar.gz cpython-02c42871cf73365dc5b6915cac2b017b2b90c81f.tar.bz2 |
Disallow keyword arguments for type constructors that don't use them.
(fixes bug #1119418)
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r-- | Modules/_randommodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index 1189036..8fe2b2b 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -481,6 +481,9 @@ random_new(PyTypeObject *type, PyObject *args, PyObject *kwds) RandomObject *self; PyObject *tmp; + if (!_PyArg_NoKeywords("Random()", kwds)) + return NULL; + self = (RandomObject *)type->tp_alloc(type, 0); if (self == NULL) return NULL; |