[Python-ideas] map, filter, reduce methods for generators

João Bernardo jbvsmo at gmail.com
Fri Apr 11 12:55:35 CEST 2014


Some guy did a similar thing, just better:
https://github.com/JulienPalard/Pipe

BTW, Changing the built-in iterators would require a change in the abc's.

João Bernardo


On 10 April 2014 19:09, Jacek Pliszka <jacek.pliszka at gmail.com> wrote:

> OK, if method chaining is a problem, what about:
>
> from StreamAlgebra import Map, Filter, Reduce
> from operator import add
>
> range(100) | Filter(f1) | Map(f2) | Filter(f3) | Map(f4) | Reduce(add)
>
> BR,
>
> Jacek
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140411/b2aa61fd/attachment.html>


More information about the Python-ideas mailing list