This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ernesto Alfonso
Recipients Ernesto Alfonso
Date 2015-06-13.22:05:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1434233116.75.0.429169275547.issue24446@psf.upfronthosting.co.za>
In-reply-to
Content
itertools.imap and map in Python 2.7 produces inconsistent behaviour when mapping the null (None) function over multiple sequences.
 


>>> [a for a in map(None, list("abcd"), range(3))]
[('a', 0), ('b', 1), ('c', 2), ('d', None)]
>>> from itertools import imap
>>> [a for a in imap(None, list("abcd"), range(3))]
[('a', 0), ('b', 1), ('c', 2)]
>>> [a for a in map(None, list("abcd"), range(3))] == [a for a in imap(None, list("abcd"), range(3))]
False
>>> 



This inconsistent and unintuitive behvaiour caused a bug in my program
History
Date User Action Args
2015-06-13 22:05:17Ernesto Alfonsosetrecipients: + Ernesto Alfonso
2015-06-13 22:05:16Ernesto Alfonsosetmessageid: <1434233116.75.0.429169275547.issue24446@psf.upfronthosting.co.za>
2015-06-13 22:05:16Ernesto Alfonsolinkissue24446 messages
2015-06-13 22:05:16Ernesto Alfonsocreate