diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-07-07 15:26:54 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-07-07 15:26:54 (GMT) |
commit | 1a870c913238e6e2178283b1d69e9be9203473f2 (patch) | |
tree | a433b73f12bc92783ecf57c0ad77f4a17126c712 /Lib/asyncio/coroutines.py | |
parent | 11116da935760bb5ff02a450708f56d3b36b7556 (diff) | |
download | cpython-1a870c913238e6e2178283b1d69e9be9203473f2.zip cpython-1a870c913238e6e2178283b1d69e9be9203473f2.tar.gz cpython-1a870c913238e6e2178283b1d69e9be9203473f2.tar.bz2 |
asyncio: sync with Tulip
- Tulip issue #181: Faster create_connection(). Call directly
waiter.set_result() in the constructor of _ProactorBasePipeTransport and
_SelectorSocketTransport, instead of using of delaying the call with
call_soon().
- Cleanup iscoroutine()
Diffstat (limited to 'Lib/asyncio/coroutines.py')
-rw-r--r-- | Lib/asyncio/coroutines.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py index 7654a0b..48730c2 100644 --- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -166,11 +166,11 @@ def iscoroutinefunction(func): return getattr(func, '_is_coroutine', False) -_COROUTINE_TYPES = (CoroWrapper, types.GeneratorType) +_COROUTINE_TYPES = (types.GeneratorType, CoroWrapper) def iscoroutine(obj): """Return True if obj is a coroutine object.""" - return isinstance(obj, _COROUTINE_TYPES) + return isinstance(obj, _COROUTINE_TYPES) def _format_coroutine(coro): |