diff options
author | Yury Selivanov <yury@magic.io> | 2016-12-15 22:36:05 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-12-15 22:36:05 (GMT) |
commit | 03660041d2d3a95e7bc4ad863278bd93e28c805e (patch) | |
tree | 601e278203f1e710c1a0bef12e8e9b82336f14e0 /Doc/library/inspect.rst | |
parent | 76febd079299d64abffee0bdd7c4c1785e5a0fa7 (diff) | |
download | cpython-03660041d2d3a95e7bc4ad863278bd93e28c805e.zip cpython-03660041d2d3a95e7bc4ad863278bd93e28c805e.tar.gz cpython-03660041d2d3a95e7bc4ad863278bd93e28c805e.tar.bz2 |
Issue #28091: Document PEP 525 & PEP 530.
Patch by Eric Appelt.
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r-- | Doc/library/inspect.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index de0c301..41a784d 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -318,6 +318,27 @@ attributes: .. versionadded:: 3.5 +.. function:: isasyncgenfunction(object) + + Return true if the object is an :term:`asynchronous generator` function, + for example:: + + >>> async def agen(): + ... yield 1 + ... + >>> inspect.isasyncgenfunction(agen) + True + + .. versionadded:: 3.6 + + +.. function:: isasyncgen(object) + + Return true if the object is an :term:`asynchronous generator iterator` + created by an :term:`asynchronous generator` function. + + .. versionadded:: 3.6 + .. function:: istraceback(object) Return true if the object is a traceback. |