map on uneven lists


In Python 3 the iterator stops when the shortest iterable is exhausted.

In Python 2 it used to extend the shorter lists by None values.


examples/functional/map_add_shorter.py
v1 = [1, 3, 5, 9]
v2 = [2, 6, 4, 8, 10]

sums = map(lambda x,y: x+y, v1, v2)
print(sums)

print(list(sums))

<map object at 0x7ff9469a8da0>
[3, 9, 9, 17]