in addition to current Pythonic way ofmap( f2 ).\I must admit I've seen and I like Java 8 notation and I think it might be more readable than Python way in a few occasions.What do you think about adding map, flatmap, filter and reduce methods to generator type ?Hi!Sorry if someone has already talked about it (my simple search did not show any results).
I would like to be able to write:range(100).\
filter( f1 ).\filter( f3 ).\map( f4 ).\reduce(operator.add)reduce( operator.add, f4(x) for x in
( f2(y) for y in range(100) if f1(y))if f3(x) )
Though longer - Java way seems to be a bit more readable as the notation follows the data flow sequence.Do you think it is worth a PEP?
BR,Jacek
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/