vxgmichel / aiostream

Generator-based operators for asynchronous iteration
http://aiostream.readthedocs.io
GNU General Public License v3.0
801 stars 34 forks source link

Implement the (callable, sentinel) usage of iterate #48

Closed vxgmichel closed 5 years ago

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ade4f79dd7d845c9ac5b2bcc47a48ab731ef71ff on iterate-with-sentinel into ab7bdd189fc16b72e492a634d949b0897583c698 on master.

vxgmichel commented 5 years ago

Abandoned as it can already be written as:

xs = stream.call(callable) | pipe.cycle() | pipe.takewhile(lambda x: x != sentinel)
# Equivalent to the confusing usage of `stream.iterate(callable, sentinel)`