2 ms·
map and filter return iterators. This is easy to fix (list(map(...)). reduce is at functools.reduce.
by dekhn 10y ago
map and filter return iterators. This is easy to fix (list(map(...)). reduce is at functools.reduce.
- dr_zoidberg 10y agoHmmm I knew there were some changes in both map and filter but didn't dig into them. If the only change is that they return iterators instead of lists, it would even help on some parts of a few projects I maintain. I still have to check it up though, can't be certain until I see what happens and if it breaks anything.