diff Objects/rangeobject.c @ 19301:b9701538f827 legacy-trunk

Patch #427190: Implement and use METH_NOARGS and METH_O.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 16 Aug 2001 13:15:00 +0000
parents 09df3254b49d
children 0e70df98424e
line wrap: on
line diff
--- a/Objects/rangeobject.c	Thu Aug 16 09:18:56 2001 +0000
+++ b/Objects/rangeobject.c	Thu Aug 16 13:15:00 2001 +0000
@@ -243,9 +243,6 @@
 
 	WARN("xrange.tolist() is deprecated; use list(xrange) instead");
 
-	if (! PyArg_ParseTuple(args, ":tolist"))
-		return NULL;
-
 	if (self->totlen == -1)
 		return PyErr_NoMemory();
 
@@ -266,7 +263,7 @@
 	PyObject *result;
 
 	static PyMethodDef range_methods[] = {
-		{"tolist",	(PyCFunction)range_tolist, METH_VARARGS,
+		{"tolist",	(PyCFunction)range_tolist, METH_NOARGS,
                  "tolist() -> list\n"
                  "Return a list object with the same values.\n"
                  "(This method is deprecated; use list() instead.)"},