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 plammens
Recipients asvetlov, plammens, yselivanov
Date 2020-12-27.20:41:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609101687.37.0.151159530312.issue42760@roundup.psfhosted.org>
In-reply-to
Content
The `inspect.iscoroutinefunction` and `inspect.iscoroutine` functions return `False` for the `asend`, `athrow` and `aclose` methods of asynchronous generators (PEP 525). These are coroutine functions (i.e. one does e.g. `await gen.asend(value)`) so I would have expected these to return `True`.

Example:

```python
async def generator():
    return
    yield
```

```python
>>> import inspect
>>> g = generator()
>>> inspect.iscoroutinefunction(g.asend)
False

>>> inspect.iscoroutine(g.asend(None))
False
```
History
Date User Action Args
2020-12-27 20:41:27plammenssetrecipients: + plammens, asvetlov, yselivanov
2020-12-27 20:41:27plammenssetmessageid: <1609101687.37.0.151159530312.issue42760@roundup.psfhosted.org>
2020-12-27 20:41:27plammenslinkissue42760 messages
2020-12-27 20:41:27plammenscreate