I pointed out a couple of typos on IRC.
I think a test of CachedIterator that iterated two iterators in parallel like so:
ci = CachedIterator([...]) i1 = iter(ci) assert i1.next() == ... i2 = iter(ci) assert i2.next() == ... assert i1.next() == ...
I think it'll pass fine, but it's something my devious mind wants to see tested.
CachingIterator needs some blank lines between its members.
Otherwise it all looks nice, and will be a nice change!
« Back to merge proposal
I pointed out a couple of typos on IRC.
I think a test of CachedIterator that iterated two iterators in parallel like so:
ci = CachedIterator( [...])
i1 = iter(ci)
assert i1.next() == ...
i2 = iter(ci)
assert i2.next() == ...
assert i1.next() == ...
I think it'll pass fine, but it's something my devious mind wants to see tested.
CachingIterator needs some blank lines between its members.
Otherwise it all looks nice, and will be a nice change!