summaryrefslogtreecommitdiff
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-08-26 06:42:30 +0000
committerGeorg Brandl <georg@python.org>2005-08-26 06:42:30 +0000
commit02c42871cf73365dc5b6915cac2b017b2b90c81f (patch)
treea85d3fb2fc3682c2a149d213f5cf9a378868abea /Objects/sliceobject.c
parentbd77da6dab9d41ef246febf54c7928ce4496dd49 (diff)
downloadcpython-git-02c42871cf73365dc5b6915cac2b017b2b90c81f.tar.gz
Disallow keyword arguments for type constructors that don't use them.
(fixes bug #1119418)
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r--Objects/sliceobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index c37af2b027..f5ed898014 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -174,6 +174,9 @@ slice_new(PyTypeObject *type, PyObject *args, PyObject *kw)
start = stop = step = NULL;
+ if (!_PyArg_NoKeywords("slice()", kw))
+ return NULL;
+
if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step))
return NULL;