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

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

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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)