summaryrefslogtreecommitdiffstats
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-04-22 13:16:27 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-04-22 13:16:27 (GMT)
commit4320f54ea3eb4bc2cb0d371e23276ef510aa25a5 (patch)
tree126e0aebf22ae8ebd97ec52edd3c4989c0fda8c4 /Objects/rangeobject.c
parent7563043bb555ce57bbd3dd805363a5e25c928efe (diff)
parentac22c6b923d12e2b9069324c82a95d2353d0cd28 (diff)
downloadcpython-4320f54ea3eb4bc2cb0d371e23276ef510aa25a5.zip
cpython-4320f54ea3eb4bc2cb0d371e23276ef510aa25a5.tar.gz
cpython-4320f54ea3eb4bc2cb0d371e23276ef510aa25a5.tar.bz2
merge 3.4 (#22785)
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 0f8cd60..17fef42 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -139,7 +139,11 @@ PyDoc_STRVAR(range_doc,
"range(stop) -> range object\n\
range(start, stop[, step]) -> range object\n\
\n\
-Return a sequence of numbers from start to stop by step.");
+Return an object that produces a sequence of integers from start (inclusive)\n\
+to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.\n\
+start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.\n\
+These are exactly the valid indices for a list of 4 elements.\n\
+When step is given, it specifies the increment (or decrement).");
static void
range_dealloc(rangeobject *r)