Raymond Hettinger added the comment:

> But isn't that the point of the length_hint?

Where it could be used reliably, it was used and used broadly.  However, there 
are circumstances (iterator vs iterable) where it can't know how to make an 
estimate and is perhaps wildly off.

I would like to mark this tracker item as closed.  IMO it is a dead-end. 

Like you, I share enthusiasm for length_hint and its potential (that I why I 
created the concept many years ago and worked very hard to apply it everywhere 
it would fit).  But trust me, it doesn't fit everywhere.  I left it out of 
imap() for a reason (it just didn't make sense).

----------

_______________________________________
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