Renamed _length_cue() to __length_hint__(). See:

http://mail.python.org/pipermail/python-dev/2006-February/060524.html
This commit is contained in:
Armin Rigo 2006-02-11 21:32:43 +00:00
parent cbcdfdc112
commit f5b3e36493
14 changed files with 41 additions and 32 deletions

View file

@ -268,10 +268,10 @@ rangeiter_len(rangeiterobject *r)
return PyInt_FromLong(r->len - r->index);
}
PyDoc_STRVAR(length_cue_doc, "Private method returning an estimate of len(list(it)).");
PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
static PyMethodDef rangeiter_methods[] = {
{"_length_cue", (PyCFunction)rangeiter_len, METH_NOARGS, length_cue_doc},
{"__length_hint__", (PyCFunction)rangeiter_len, METH_NOARGS, length_hint_doc},
{NULL, NULL} /* sentinel */
};