diff Objects/rangeobject.c @ 35450:97c97194e64b 2.4

Disallow keyword arguments for type constructors that don't use them (fixes #1119418).
author Georg Brandl <georg@python.org>
date Fri, 26 Aug 2005 06:43:16 +0000
parents c81ed079576f
children
line wrap: on
line diff
--- a/Objects/rangeobject.c	Thu Aug 25 22:40:21 2005 +0000
+++ b/Objects/rangeobject.c	Fri Aug 26 06:43:16 2005 +0000
@@ -90,6 +90,9 @@
 	long ilow = 0, ihigh = 0, istep = 1;
 	long n;
 
+	if (!_PyArg_NoKeywords("xrange()", kw))
+		return NULL;
+
 	if (PyTuple_Size(args) <= 1) {
 		if (!PyArg_ParseTuple(args,
 				"l;xrange() requires 1-3 int arguments",