Skip to content

Latest commit

 

History

History
executable file
·
34 lines (24 loc) · 1.68 KB

readme.md

File metadata and controls

executable file
·
34 lines (24 loc) · 1.68 KB

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