Real-world use cases for map's None fill-in feature?
cappy2112 at gmail.com
Mon Jan 9 20:45:12 EST 2006
I haven't used itertools yet, so I don't know their capabilities.
I have used map twice recently with None as the first argument. This
was also the first time I've used map, and was dissapointed when I
found out about the truncation. The lists map was iterating over in my
case were of unequal lengths, so I had to pad the lists to make sure
nothing was truncated.
The most universal solution would be to provide a mechanism to
truncate, pad, or remain the same length. However, with the pad
feature, room should be provided for the user to add the pad item.
More information about the Python-list