Message241506
asyncio/coroutines.py 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:02 | scoder | set | recipients:
+ scoder, gvanrossum, vstinner, yselivanov |
2015-04-19 10:21:02 | scoder | set | messageid: <1429438862.32.0.692811371536.issue24004@psf.upfronthosting.co.za> |
2015-04-19 10:21:02 | scoder | link | issue24004 messages |
2015-04-19 10:21:02 | scoder | create | |
|