This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scoder
Recipients gvanrossum, scoder, vstinner, yselivanov
Date 2015-04-19.10:21:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
asyncio/ contains this code:

_COROUTINE_TYPES = (types.GeneratorType, CoroWrapper)

def iscoroutine(obj):
    """Return True if obj is a coroutine object."""
    return isinstance(obj, _COROUTINE_TYPES)

In other places, it uses inspect.isgenerator() to do the same thing. This is inconsistent and should be changed. Code that wants to patch inspect.isgenerator() in order to support other generator types shouldn't also have to patch asyncio directly, and code that wants to support other generator types in asyncio shouldn't have to patch both places either.
Date User Action Args
2015-04-19 10:21:02scodersetrecipients: + scoder, gvanrossum, vstinner, yselivanov
2015-04-19 10:21:02scodersetmessageid: <>
2015-04-19 10:21:02scoderlinkissue24004 messages
2015-04-19 10:21:02scodercreate