Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enricobacis/infinite
itertools operations on infinite generators
https://github.com/enricobacis/infinite
Last synced: 10 days ago
JSON representation
itertools operations on infinite generators
- Host: GitHub
- URL: https://github.com/enricobacis/infinite
- Owner: enricobacis
- License: mit
- Created: 2016-12-12T15:28:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-12T15:30:39.000Z (about 8 years ago)
- Last Synced: 2024-11-07T21:09:46.050Z (2 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
infinite
========*itertools operations on infinite generators*
Description
-----------Some of the ``itertools`` operations do not work on infinite generators,
this package is the beginning of the work to port some of the iterator
concepts to the infinity.``infinite`` is compatible with both python2 and python3.
Installation
------------The package has been uploaded to `PyPI`_, so you can
install the package using pip:pip install infinite
Usage
-----For example if we want to iterate all the pairs of natural numbers:
.. code:: python
from itertools import count
from infinite import productfor x, y in product(count(0), count(0)):
print(x, y)
if (x, y) == (3, 3):
break.. _PyPI: https://pypi.python.org