Skip to content

Commit fee4059

Browse files
miss-islingtonx41lakazamkumaraditya303terryjreedy
authored
[3.10] gh-81611: Improve range paragraph in 8.3 of language reference (GH-98353) (#100705)
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 8b02313 commit fee4059

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

200199
.. _try:

0 commit comments

Comments
 (0)