]> granicus.if.org Git - python/commitdiff
range() doesn't return a list
authorBenjamin Peterson <benjamin@python.org>
Wed, 3 Jun 2009 03:13:30 +0000 (03:13 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 3 Jun 2009 03:13:30 +0000 (03:13 +0000)
Doc/reference/compound_stmts.rst

index 214143b82b33f156fcf1b5be87b47c7f0733aac0..016ccbbc6c5ddb759310dddff3e049cdc21b0e3d 100644 (file)
@@ -182,7 +182,7 @@ the next item assigned to it.
 Names in the target list are not deleted when the loop is finished, but if the
 sequence is empty, it will not have been assigned to at all by the loop.  Hint:
 the built-in function :func:`range` returns an iterator of integers suitable to
-emulate the effect of Pascal's ``for i := a to b do``; e.g., ``range(3)``
+emulate the effect of Pascal's ``for i := a to b do``; e.g., ``list(range(3))``
 returns the list ``[0, 1, 2]``.
 
 .. note::