summaryrefslogtreecommitdiffstats
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-08-16 13:15:00 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-08-16 13:15:00 (GMT)
commite3eb1f2b2320bceb10a763ec8691200b85ec287a (patch)
treedf47f81391869945dc661a08c405b53753fba887 /Objects/rangeobject.c
parentc35422109b36d20f409a3a72f60c0c7e2e0bc824 (diff)
downloadcpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.zip
cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.tar.gz
cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.tar.bz2
Patch #427190: Implement and use METH_NOARGS and METH_O.
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 9f155cf..5ad86ed 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -243,9 +243,6 @@ range_tolist(rangeobject *self, PyObject *args)
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 @@ range_getattr(rangeobject *r, char *name)
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.)"},