See https://github.com/NotIntMan/inplace_it/issues/5
Thanks @zakarumych for suggestion!
I think it would be good: it's more convenient to not require this, and in some cases the size hint can be better then ExactSizeIterator. For example, repeat() doesn't implement it, so repeat().take() is unusable with the exact size, but it does in fact have the exact size, and the size_hint() reflects that nicely.
See https://github.com/NotIntMan/inplace_it/issues/5 Thanks @zakarumych for suggestion! I think it would be good: it's more convenient to not require this, and in some cases the size hint can be better then
ExactSizeIterator
. For example,repeat()
doesn't implement it, sorepeat().take()
is unusable with the exact size, but it does in fact have the exact size, and thesize_hint()
reflects that nicely.