[issue24446] imap and map inconsistent behaviour
Ned Deily
report at bugs.python.org
Sun Jun 14 02:43:40 CEST 2015
Ned Deily added the comment:
This is a documented behavior difference in itertools.imap:
"If function is set to None, then imap() returns the arguments as a tuple. Like map() but stops when the shortest iterable is exhausted instead of filling in None for shorter iterables. The reason for the difference is that infinite iterator arguments are typically an error for map() (because the output is fully evaluated) but represent a common and useful way of supplying arguments to imap()."
https://docs.python.org/2/library/itertools.html#itertools.imap
----------
nosy: +ned.deily
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24446>
_______________________________________
More information about the Python-bugs-list
mailing list