summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-03-10 08:32:47 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-03-10 08:32:47 (GMT)
commitd2c36261a202ec61bed023f22815c41d8179ace2 (patch)
tree1ee4f5e092f277306eb2477035f166fa37ef4be8 /Objects
parenta6366fe085dba6b47ff33a472a5371c4573a8c30 (diff)
downloadcpython-d2c36261a202ec61bed023f22815c41d8179ace2.zip
cpython-d2c36261a202ec61bed023f22815c41d8179ace2.tar.gz
cpython-d2c36261a202ec61bed023f22815c41d8179ace2.tar.bz2
Eliminate the double reverse option. It's only use case
was academic and it was potentially confusing to use.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/enumobject.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/Objects/enumobject.c b/Objects/enumobject.c
index 55595ce..1d13123 100644
--- a/Objects/enumobject.c
+++ b/Objects/enumobject.c
@@ -236,23 +236,11 @@ reversed_len(reversedobject *ro)
return PyObject_Size(ro->seq);
}
-static PyObject *
-reversed_reverse(reversedobject *ro, PyObject *unused)
-{
- return PyObject_GetIter(ro->seq);
-}
-
PyDoc_STRVAR(reversed_doc,
"reverse(sequence) -> reverse iterator over values of the sequence\n"
"\n"
"Return a reverse iterator");
-static PyMethodDef reversed_methods[] = {
- {"__reversed__", (PyCFunction)reversed_reverse,
- METH_NOARGS, reversed_doc},
- {NULL, NULL} /* sentinel */
-};
-
static PySequenceMethods reversed_as_sequence = {
(inquiry)reversed_len, /* sq_length */
0, /* sq_concat */
@@ -289,7 +277,7 @@ PyTypeObject PyReversed_Type = {
0, /* tp_weaklistoffset */
PyObject_SelfIter, /* tp_iter */
(iternextfunc)reversed_next, /* tp_iternext */
- reversed_methods, /* tp_methods */
+ 0, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */