5 ms·
I've implemented Go-style channels in Python, and it turned out pretty well. The 'select' statement is a bit verbose, but still pretty readable. You can find
by stuglaser 13y ago
I've implemented Go-style channels in Python, and it turned out pretty well. The 'select' statement is a bit verbose, but still pretty readable.
You can find the code here: http://github.com/stuglaser/pychan http://github.com/stuglaser/pychan
And documentation here: https://chan.readthedocs.org/en/latest/ https://chan.readthedocs.org/en/latest/