mirror of
https://github.com/python/cpython.git
synced 2025-11-13 15:40:05 +00:00
gh-84753: Clarify change made to inspect functions (#94554)
This commit is contained in:
parent
92bcb26d00
commit
a2a3f2c541
1 changed files with 6 additions and 2 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
:func:`inspect.iscoroutinefunction` now properly returns ``True`` when an instance
|
:func:`inspect.iscoroutinefunction`, :func:`inspect.isgeneratorfunction`,
|
||||||
of :class:`unittest.mock.AsyncMock` is passed to it. This makes it consistent with
|
and :func:`inspect.isasyncgenfunction` now properly return ``True`` for
|
||||||
|
duck-typed function-like objects like instances of
|
||||||
|
:class:`unittest.mock.AsyncMock`.
|
||||||
|
|
||||||
|
This makes :func:`inspect.iscoroutinefunction` consistent with the
|
||||||
behavior of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK.
|
behavior of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue