Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rob_smallshire
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
rob_smallshire
11y ago
You could use the python-transducer library < https://github.com/sixty-north/python-transducers> I mentioned in my other comments to do this. It supports using the same transducers with iterables and push-event c
2.
▲
by
rob_smallshire
11y ago
Yes, although transducers are more general than iterators. Iterators model lazy series from which you must 'pull' elements. Transducers can also be used with elements that are 'pushed', such as events coming from channe
3.
▲
by
rob_smallshire
11y ago
Note that the first link has been superseded by https://github.com/sixty-north/python-transducers which is also available on PyPI as https://pypi.python.org/pypi/transducer/
4.
▲
by
rob_smallshire
11y ago
This code by Cognitect is a fairly literal port of Clojure transducers to Python. If you'd like to see a more Pythonic interpretation of transducers, take a look at Sixty-North's alternative https://github.com/six