From ea3fdf44a29accd666a3b5f058539c351d921657 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 29 Dec 2002 16:33:45 +0000 Subject: SF patch #659536: Use PyArg_UnpackTuple where possible. Obtain cleaner coding and a system wide performance boost by using the fast, pre-parsed PyArg_Unpack function instead of PyArg_ParseTuple function which is driven by a format string. --- Objects/sliceobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/sliceobject.c') diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c index 7198cca4b1..796df2bb0c 100644 --- a/Objects/sliceobject.c +++ b/Objects/sliceobject.c @@ -174,7 +174,7 @@ slice_new(PyTypeObject *type, PyObject *args, PyObject *kw) start = stop = step = NULL; - if (!PyArg_ParseTuple(args, "O|OO:slice", &start, &stop, &step)) + if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step)) return NULL; /* This swapping of stop and start is to maintain similarity with -- cgit v1.2.1