Hi, 2014-09-08 12:16 GMT+02:00 Think Kos <[email protected]>: > I wrote Trololio, a module that makes writing code for both Tulip and > Trollius easy. It addresses [Differences between Trollius and > Tulip](http://trollius.readthedocs.org/en/latest/asyncio.html), check it > out: [PyPi](https://pypi.python.org/pypi/Trololio), > [GitHub](https://github.com/ThinkChaos/Trololio/). > Any feedback would be appreciated.
I'm not sure that I understood the purpose of Trololio. The main change between asyncio and Trololio on Python 3.3+, is that you can write coroutines using "yield From()" and "raise Return()". The @trololio.coroutine decorator wraps yield to yield from, and Return exception to a return. Trollius is implemented differently: it uses an event loop which supports trollius coroutines (yield) and asyncio coroutines (yield from). On Python < 3.3, Trololio is a wrapper to Trollius (it duplicates almost all symbols if I understood correctly). So the main use case of Trololilo is to have the same API with Python 2 and Python 3 (coroutines using yield) if you are not able to install Trollius on Python 3.3+. Why not using Trollius directly? Is it possible to use (unmodified) modules written for Trollius with Trololio (on Python 2)? Is it possible to use (unmodified) modules written for asyncio with Trololio (on Python 3.3+)? Trololio documentation says "If your code was written for asyncio, convert it to use Trollius". Using Trollius 1.0, it's now possible to run unmodified modules written for asyncio (on Python 3.3+). Victor
