There is a protocol for specifying a length hint (object.__length_hint__) on iterators. However, all the functions in the stdlib that I have tested with do not prop