Skip to content

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.

License

Notifications You must be signed in to change notification settings

neverendingqs/pyiterable

Repository files navigation

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages