Jeffrey Yasskin wrote:
> <wild-speculation>
> Is it possible to make the result of map() look like a list if people
> are paying attention, but use memory like an iterator when they're
> not?

I suppose it could lazily materialise a list behind the
scenes when needed (i.e. on the first __getitem__ or
__len__ call), but the semantics still wouldn't be *exactly*
the same, as it wouldn't be possible to iterate over it more
than once. Also as any side-effects would be delayed.

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to