[Python-checkins] r73161 - python/branches/py3k/Doc/reference/compound_stmts.rst
benjamin.peterson
python-checkins at python.org
Wed Jun 3 05:13:30 CEST 2009
Author: benjamin.peterson
Date: Wed Jun 3 05:13:30 2009
New Revision: 73161
Log:
range() doesn't return a list
Modified:
python/branches/py3k/Doc/reference/compound_stmts.rst
Modified: python/branches/py3k/Doc/reference/compound_stmts.rst
==============================================================================
--- python/branches/py3k/Doc/reference/compound_stmts.rst (original)
+++ python/branches/py3k/Doc/reference/compound_stmts.rst Wed Jun 3 05:13:30 2009
@@ -182,7 +182,7 @@
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::
More information about the Python-checkins
mailing list