Skip to content

Commit 0615e7f

Browse files
miss-islingtonambv
andauthored
pythongh-84753: Clarify change made to inspect functions (pythonGH-94554) (pythonGH-94560)
(cherry picked from commit a2a3f2c) Co-authored-by: Łukasz Langa <[email protected]>
1 parent e284468 commit 0615e7f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
:func:`inspect.iscoroutinefunction` now properly returns ``True`` when an instance
2-
of :class:`unittest.mock.AsyncMock` is passed to it. This makes it consistent with
1+
:func:`inspect.iscoroutinefunction`, :func:`inspect.isgeneratorfunction`,
2+
and :func:`inspect.isasyncgenfunction` now properly return ``True`` for
3+
duck-typed function-like objects like instances of
4+
:class:`unittest.mock.AsyncMock`.
5+
6+
This makes :func:`inspect.iscoroutinefunction` consistent with the
37
behavior of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK.

0 commit comments

Comments
 (0)