Raymond Hettinger added the comment:

Length hints were intentionally omitted from the Python 3 map() and filter() 
which used to be in the itertools module.   I explored that notion of iterator 
length transparency years ago.  While I don't remember all the details, I did 
record some notes at the top of Lib/test/test_iterlen.py.

BTW, I also don't think the list(map(...)) or list(filter(...)) case is worth 
optimizing.  For big inputs, manifesting the whole input into a list is usually 
(but not always) the wrong thing to do if you care about performance (throwing 
away the iterator's superb L1 and L2 cache performance and throwing away the 
memory efficiency).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26828>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to