changeset: 96186:ff983ee10b3e user: Yury Selivanov date: Thu May 21 12:03:21 2015 -0400 files: Lib/inspect.py description: Issue 24017: Use abc.Coroutine in inspect.iscoroutine() function diff -r 548d5704fcb3 -r ff983ee10b3e Lib/inspect.py --- a/Lib/inspect.py Thu May 21 11:50:30 2015 -0400 +++ b/Lib/inspect.py Thu May 21 12:03:21 2015 -0400 @@ -212,8 +212,7 @@ def iscoroutine(object): """Return true if the object is a coroutine.""" - return (isinstance(object, types.GeneratorType) and - object.gi_code.co_flags & (CO_COROUTINE | CO_ITERABLE_COROUTINE)) + return isinstance(object, collections.abc.Coroutine) def istraceback(object): """Return true if the object is a traceback.