by fulafel · 11y ago · 0 comments
Generators have a "send()" method to push data in it.
We have yield from to delegate to sub coroutines.
And generators can be classes for more advanced behaviors.
All this lib does is to make something that already exists in the language, in a heavier and slower way.
What would be the pythonic way of "mapping over" the inputs that are sent into a generator, or performing grouping operations on those inputs?
For example, how to transform a generator that expects to be sent sets of strings into a generator that simply accepts a flat stream of strings?
Iteration is everything in Python. It's the core philosophy.
We already got tools to do this in better, lighter way.