diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-09-28 14:07:12 (GMT) |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-09-28 14:07:12 (GMT) |
commit | fd448daf770de7ceb5f433c40a14c9a889dffa92 (patch) | |
tree | 7136eac5032e4957116ce7d7d3e0e1ad176c927f /Doc | |
parent | 7a1901f86129dc15dc9004da02907eb1c90f32fa (diff) | |
download | cpython-fd448daf770de7ceb5f433c40a14c9a889dffa92.zip cpython-fd448daf770de7ceb5f433c40a14c9a889dffa92.tar.gz cpython-fd448daf770de7ceb5f433c40a14c9a889dffa92.tar.bz2 |
Close issue #16073: fix map() example in list comprehension documentation.
Thanks for the e-mail report to docs@.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/tutorial/datastructures.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 7ec044c..12b5c57 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -181,7 +181,7 @@ We can obtain the same result with:: squares = [x**2 for x in range(10)] -This is also equivalent to ``squares = map(lambda x: x**2, range(10))``, +This is also equivalent to ``squares = list(map(lambda x: x**2, range(10)))``, but it's more concise and readable. A list comprehension consists of brackets containing an expression followed |