pyiterable

Iterable chains


License
MIT
Install
pip install pyiterable==0.4.0

Documentation

Build Status Coverage Status

Pyiterable

Python comes with some nice built-in methods for operating on iterables, but it can get messy really quickly if you want to transform an iterable multiple times. Write more expressive code by chaining built-in transformations with this module.

Get it via pip install pyiterable!

Example

from pyiterable import Iterable
...
values = Iterable(["1", "2", "5", "9"])

sum = (values
       .map(lambda x: int(x))
       .filter(lambda x: x > 4)
       .reduce(lambda a, b: a + b)
)

Inspiration

Links