Skip to content

Commit ad3a927

Browse files
authored
Merge pull request #222 from maerteijn/imap-alternative
'map' is also in six.moves
2 parents 003763d + ccc4955 commit ad3a927

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/compatible_idioms.rst

+8
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,14 @@ imap
860860
861861
myiter = map(func, myoldlist)
862862
assert isinstance(myiter, iter)
863+
.. code:: python
864+
865+
# Python 2 and 3: option 3
866+
from six.moves import map
867+
868+
myiter = map(func, myoldlist)
869+
assert isinstance(myiter, iter)
870+
863871
zip, izip
864872
~~~~~~~~~
865873

0 commit comments

Comments
 (0)