diff options
author | Raymond Hettinger <python@rcn.com> | 2010-09-01 08:27:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-09-01 08:27:16 (GMT) |
commit | 293ffcf89d3cc7df7d0897fabace49e0d0056a1d (patch) | |
tree | 50e7bd96920bc0527f3eceeea9e8d985710569b8 /Doc/library | |
parent | 9092d20e0c45735ae54a03ebca83bb35ddcb4f99 (diff) | |
download | cpython-293ffcf89d3cc7df7d0897fabace49e0d0056a1d.zip cpython-293ffcf89d3cc7df7d0897fabace49e0d0056a1d.tar.gz cpython-293ffcf89d3cc7df7d0897fabace49e0d0056a1d.tar.bz2 |
Fixup broken example
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/operator.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst index 597be9d..2d03061 100644 --- a/Doc/library/operator.rst +++ b/Doc/library/operator.rst @@ -387,7 +387,7 @@ expect a function argument. >>> inventory = [('apple', 3), ('banana', 2), ('pear', 5), ('orange', 1)] >>> getcount = itemgetter(1) - >>> map(getcount, inventory) + >>> list(map(getcount, inventory)) [3, 2, 5, 1] >>> sorted(inventory, key=getcount) [('orange', 1), ('banana', 2), ('apple', 3), ('pear', 5)] |