-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/23/2014 04:37 PM, Guido van Rossum wrote:
> I very much like the idea of having at least the Future class of
> either framework  be compatible with the event loop classes of the
> other.
> 
> We may even be able to make both frameworks' Task and coroutine 
> compatible with each others' loop.
> 
> If this requires some adjustments to asyncio, so be it. (There are 
> probably some isinstance() checks that get in the way, we should
> do something different.)
> 

That would indeed be ideal, at lest for the case I ran into :-)

Now, I think checking if 'trollius' is in sys.modules would work at
lest for now, since it's expected that someone who already imported
trollius to, well, use it. This is what I'm considering for aiodns,
since it can work with both:

if 'trollius' in sys.modules:
    import trollius as asyncio
else:
    # prefer asyncio, fallback to trollius
    try:
       import asyncio
    except ImportError:
       import trollius as asyncio


Cheers,

- -- 
Saúl Ibarra Corretgé
bettercallsaghul.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBAgAGBQJTf2LHAAoJEEEOVVOum8BZc1YP/2PlZWOG6ka+QitCmrdztrd1
O08kOhCB84YjGSweq57+p8JELAiNkt3y7r3o8GZYx3ebdgq3vEusMZIyFNIiQFwz
xHID3UGa18a7ZlEOzjGgvQ1pQnCaZvurpDb4ZjYjCniWdp+5e/P7t9kATIuwZQXp
Zgf5NW3BGsasi4BzJ7SRvZ4HvN64KhbvgH6IVMKEd1wVAIvsQEyW2Dzqf6+zbW4e
aLpsdxi7nZOVjCA+IFK+jNdX8AoY6v45MFzpA5YrHHfA9r+BhgE/hUY164AU6T9V
fRq46d1sF6bfwrIg0ILGxJ0GmBJotRPvAoMBWuX5gmpHwQo2HtK/fdHUQvBns3Ps
hZNFhyDTW8kEw26gvPag1g+6hPuWxvXhJMllMIRWrhiGWP0iQpDQ8qaN0XC2DLYv
ck3PqhwR25Zsk+qPnbA5QyExFV+DEajD0z2OzuKQ1cAyAJn5DTaQw3chEQ55LEYY
FdssUpB7DB7ncB85b+8nzrigYeB73k4DFJs5HdELAJw6E2ibs+b/uzy68r/sDdXb
2u81OY+3j1K9u96KTvfV0NWW7fdXJ5hWaNsEwYPiwHSVWzXbKNU3qTOuH3nlJ8Nv
XmZyNq08JziTRLcvl0+mSeVbbrBIC0bApva2RYd/30nqSgLfldNhiFHQ4mOpjBqg
Ww6MsX8sQY8V649ihLMI
=uE7d
-----END PGP SIGNATURE-----

Reply via email to