Mercurial > cpython-lru_cache-weakref
diff Objects/rangeobject.c @ 35449:1fdfd0130e28 legacy-trunk
Disallow keyword arguments for type constructors that don't use them.
(fixes bug #1119418)
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 26 Aug 2005 06:42:30 +0000 |
| parents | 624e9635c3ad |
| children | e22334b1da67 |
line wrap: on
line diff
--- a/Objects/rangeobject.c Thu Aug 25 22:40:16 2005 +0000 +++ b/Objects/rangeobject.c Fri Aug 26 06:42:30 2005 +0000 @@ -45,6 +45,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",
