diff -r dcf9e9ae5393 -r 2eacb34be5a0 Lib/asyncio/coroutines.py --- a/Lib/asyncio/coroutines.py Wed Dec 23 00:37:50 2015 +0200 +++ b/Lib/asyncio/coroutines.py Wed Dec 23 00:47:22 2015 -0600 @@ -243,8 +243,11 @@ def iscoroutinefunction(func): """Return True if func is a decorated coroutine function.""" - return (getattr(func, '_is_coroutine', False) or - _inspect_iscoroutinefunction(func)) + return_value = False + if inspect.isfunction(func) or inspect.ismethod(func): + return_value = (getattr(func, '_is_coroutine', False) or + _inspect_iscoroutinefunction(func)) + return return_value _COROUTINE_TYPES = (types.GeneratorType, CoroWrapper)