On Sat, Dec 01, 2018 at 12:06:23PM -0500, David Mertz wrote: > Given that the anti-fix is just as simple and currently available, I don't > see why we'd want a change: > > # map->sequence > mo = list(mo) > > FWIW, I actually do write exactly that code fairly often, it's not hard.
Sure, but that makes a copy of the original data and means you lose the benefit of map being lazy. Naturally we will always have the ability to call list and eagerly convert to a sequence, but these proposals are for a way of getting the advantages of sequence-like behaviour while still keeping the advantages of laziness. With iterators, the only way to get that advantage of laziness is to give up the ability to query length, random access to items, etc even when the underlying data is a sequence and that information would have been readily available. We can, at least sometimes, have the best of both worlds. Maybe. -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/