Treat an iterator as a list
Lazily evaluated lists in Python
iterlist.IterList accepts a single iterable as its only constructor argument.
iterlist.IterList behaves as a normal list, and will only
evaluate the iterable as needed to satisfy requests for element.
If there is a request for index
, then elements 0 - 5 will be
evaluated if they have not been yet. Certain operations like
negative indexing will force the list to be evaluated. This decision was made
to make the iterlist outwardly appear as much like a normal list as possible.
This implementation does not make any attempt to protect you from running out
of memory attempting to construct a list from an infinite iterator. A future
version may implement
InfiniteIterList, which will not have support for any
operation which would require consuming the entire iterable.
BSD 2-clause (inherited from lazylist)
Apparently this is not a new idea...
Forked from: https://github.com/ryanhaining/lazylist (2014/10)
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size iterlist-0.3-py3-none-any.whl (5.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size iterlist-0.3.tar.gz (8.5 kB)||File type Source||Python version None||Upload date||Hashes View hashes|