Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4320f54

Browse files
committed
merge 3.4 (#22785)
2 parents 7563043 + ac22c6b commit 4320f54

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Objects/rangeobject.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ PyDoc_STRVAR(range_doc,
139139
"range(stop) -> range object\n\
140140
range(start, stop[, step]) -> range object\n\
141141
\n\
142-
Return a sequence of numbers from start to stop by step.");
142+
Return an object that produces a sequence of integers from start (inclusive)\n\
143+
to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.\n\
144+
start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.\n\
145+
These are exactly the valid indices for a list of 4 elements.\n\
146+
When step is given, it specifies the increment (or decrement).");
143147

144148
static void
145149
range_dealloc(rangeobject *r)

0 commit comments

Comments
 (0)