Skip to content

Commit 8b1f125

Browse files
x41lakazamkumaraditya303terryjreedy
authored
gh-81611: Improve range paragraph in 8.3 of language reference (#98353)
Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 73097d9 commit 8b1f125

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Doc/reference/compound_stmts.rst

Lines changed: 2 additions & 3 deletions
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)