Skip to content

Commit eba6b00

Browse files
miss-islingtonx41lakazamkumaraditya303terryjreedy
authored
[3.11] gh-81611: Improve range paragraph in 8.3 of language reference (GH-98353) (#100704)
gh-81611: Improve `range` paragraph in 8.3 of language reference (GH-98353) (cherry picked from commit 8b1f125) Co-authored-by: 4l4k4z4m <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent c915f00 commit eba6b00

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Doc/reference/compound_stmts.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,8 @@ those made in the suite of the for-loop::
192192

193193
Names in the target list are not deleted when the loop is finished, but if the
194194
sequence is empty, they will not have been assigned to at all by the loop. Hint:
195-
the built-in function :func:`range` returns an iterator of integers suitable to
196-
emulate the effect of Pascal's ``for i := a to b do``; e.g., ``list(range(3))``
197-
returns the list ``[0, 1, 2]``.
195+
the built-in type :func:`range` represents immutable arithmetic sequences of integers.
196+
For instance, iterating ``range(3)`` successively yields 0, 1, and then 2.
198197

199198
.. versionchanged:: 3.11
200199
Starred elements are now allowed in the expression list.

0 commit comments

Comments
 (0)