mirror of https://github.com/python/cpython
#19067: use imperative mood in range object docstrings. Patch by Marco Buttu.
This commit is contained in:
parent
4e1f3d669b
commit
5792ce151c
|
@ -139,7 +139,7 @@ PyDoc_STRVAR(range_doc,
|
||||||
"range(stop) -> range object\n\
|
"range(stop) -> range object\n\
|
||||||
range(start, stop[, step]) -> range object\n\
|
range(start, stop[, step]) -> range object\n\
|
||||||
\n\
|
\n\
|
||||||
Returns a virtual sequence of numbers from start to stop by step.");
|
Return a virtual sequence of numbers from start to stop by step.");
|
||||||
|
|
||||||
static void
|
static void
|
||||||
range_dealloc(rangeobject *r)
|
range_dealloc(rangeobject *r)
|
||||||
|
@ -865,14 +865,14 @@ static PyObject * range_iter(PyObject *seq);
|
||||||
static PyObject * range_reverse(PyObject *seq);
|
static PyObject * range_reverse(PyObject *seq);
|
||||||
|
|
||||||
PyDoc_STRVAR(reverse_doc,
|
PyDoc_STRVAR(reverse_doc,
|
||||||
"Returns a reverse iterator.");
|
"Return a reverse iterator.");
|
||||||
|
|
||||||
PyDoc_STRVAR(count_doc,
|
PyDoc_STRVAR(count_doc,
|
||||||
"rangeobject.count(value) -> integer -- return number of occurrences of value");
|
"rangeobject.count(value) -> integer -- return number of occurrences of value");
|
||||||
|
|
||||||
PyDoc_STRVAR(index_doc,
|
PyDoc_STRVAR(index_doc,
|
||||||
"rangeobject.index(value, [start, [stop]]) -> integer -- return index of value.\n"
|
"rangeobject.index(value, [start, [stop]]) -> integer -- return index of value.\n"
|
||||||
"Raises ValueError if the value is not present.");
|
"Raise ValueError if the value is not present.");
|
||||||
|
|
||||||
static PyMethodDef range_methods[] = {
|
static PyMethodDef range_methods[] = {
|
||||||
{"__reversed__", (PyCFunction)range_reverse, METH_NOARGS, reverse_doc},
|
{"__reversed__", (PyCFunction)range_reverse, METH_NOARGS, reverse_doc},
|
||||||
|
|
Loading…
Reference in New Issue