[Python-checkins] r84386 - python/branches/release31-maint/Doc/library/operator.rst

raymond.hettinger python-checkins at python.org
Wed Sep 1 10:27:16 CEST 2010


Author: raymond.hettinger
Date: Wed Sep  1 10:27:16 2010
New Revision: 84386

Log:
Fixup broken example

Modified:
   python/branches/release31-maint/Doc/library/operator.rst

Modified: python/branches/release31-maint/Doc/library/operator.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/operator.rst	(original)
+++ python/branches/release31-maint/Doc/library/operator.rst	Wed Sep  1 10:27:16 2010
@@ -387,7 +387,7 @@
 
       >>> 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)]


More information about the Python-checkins mailing list