summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/coroutines.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-07 15:27:27 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-07 15:27:27 (GMT)
commitf80c52bf683c5a9f9782eed475cda41ed7e2e400 (patch)
tree58c73a033160fa0868e7a375dec0dd243f7e024e /Lib/asyncio/coroutines.py
parent07de7b5db1d3cbaa27ffb782f7bd7d6563df271f (diff)
parent1a870c913238e6e2178283b1d69e9be9203473f2 (diff)
downloadcpython-f80c52bf683c5a9f9782eed475cda41ed7e2e400.zip
cpython-f80c52bf683c5a9f9782eed475cda41ed7e2e400.tar.gz
cpython-f80c52bf683c5a9f9782eed475cda41ed7e2e400.tar.bz2
(Merge 3.4) 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.py4
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):