Message264008
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. |
|
Date |
User |
Action |
Args |
2016-04-22 12:49:57 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, vstinner, alex |
2016-04-22 12:49:57 | serhiy.storchaka | set | messageid: <1461329397.87.0.908726925926.issue26828@psf.upfronthosting.co.za> |
2016-04-22 12:49:57 | serhiy.storchaka | link | issue26828 messages |
2016-04-22 12:49:57 | serhiy.storchaka | create | |
|