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 serhiy.storchaka
Recipients alex, rhettinger, serhiy.storchaka, vstinner
Date 2016-04-22.12:49:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461329397.87.0.908726925926.issue26828@psf.upfronthosting.co.za>
In-reply-to
Content
See also issue14126.

It makes sense to implement map.__length_hint__() and  zip.__length_hint__(). But note that map() and zip() take several iterables, and we should call __length_hint__() for every of them (unless found a one with not implemented __length_hint__()). This can slow down the execution for short sequences.

It is impossible to implement reasonable filter.__length_hint__(), because the length of resulting sequence can be from 0 to the length of the input sequence, and returning the maximal value would be not correct.
History
Date User Action Args
2016-04-22 12:49:57serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, vstinner, alex
2016-04-22 12:49:57serhiy.storchakasetmessageid: <1461329397.87.0.908726925926.issue26828@psf.upfronthosting.co.za>
2016-04-22 12:49:57serhiy.storchakalinkissue26828 messages
2016-04-22 12:49:57serhiy.storchakacreate