Tim Chase <python.l...@tim.thechases.com> writes: >> result = [(tmp, tmp+1) for tmp in map(expensive_calculation, data)] > > As charmingly expressive as map() is, the wildly different behavior in > py3 (it's a generator that evaluates lazily) vs py2 (it consumes the > entire iterable in one go) leads me to avoid it in general,
Well, there's itertools.imap which maps lazily in py2. -- https://mail.python.org/mailman/listinfo/python-list