From: Benjamin Peterson Date: Wed, 3 Jun 2009 03:13:30 +0000 (+0000) Subject: range() doesn't return a list X-Git-Tag: v3.1rc2~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3db5e7be1cf61756e89c40efcc1e24f00f33425b;p=thirdparty%2FPython%2Fcpython.git range() doesn't return a list --- diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 214143b82b33..016ccbbc6c5d 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -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::