This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients MSeifert, alex, rhettinger, serhiy.storchaka, terry.reedy, vstinner
Date 2017-04-26.00:39:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493167148.55.0.396778707735.issue26828@psf.upfronthosting.co.za>
In-reply-to
Content
> 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).
History
Date User Action Args
2017-04-26 00:39:08rhettingersetrecipients: + rhettinger, terry.reedy, vstinner, alex, serhiy.storchaka, MSeifert
2017-04-26 00:39:08rhettingersetmessageid: <1493167148.55.0.396778707735.issue26828@psf.upfronthosting.co.za>
2017-04-26 00:39:08rhettingerlinkissue26828 messages
2017-04-26 00:39:07rhettingercreate