diff --git a/CHANGELOG.md b/CHANGELOG.md index 601f12c8e40519eae868a43cb6c34597f6c2ae17..1e0dc528850f233f1d9cf6adadeb766248472f1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,4 +6,5 @@ * unit tests for overloading * fixed #60 * fixed #59 +* extended type signature of ListWrapperIterator diff --git a/satella/coding/sequences/iterators.py b/satella/coding/sequences/iterators.py index 99a059ba508d89b85be509fd80ed821c1bd1f934..706ab4973fbdce5d049c15e6126c65ec7b400f0c 100644 --- a/satella/coding/sequences/iterators.py +++ b/satella/coding/sequences/iterators.py @@ -499,7 +499,7 @@ class _ListWrapperIteratorIterator(tp.Iterator[T]): return item -class ListWrapperIterator(tp.Iterator[T]): +class ListWrapperIterator(tp.Sequence[T], tp.Iterator[T]): """ A wrapped for an iterator, enabling using it as a normal list. @@ -512,6 +512,8 @@ class ListWrapperIterator(tp.Iterator[T]): Essentially a class that lets you reuse one-shot iterators. This is additionally a generic class. + + :ivar internal_pointer: (int) the number of element this list internally points to """ __slots__ = 'iterator', 'exhausted', 'list', 'internal_pointer'