MCPcopy Index your code
hub / github.com/python/cpython / isasyncgenfunction

Function isasyncgenfunction

Lib/inspect.py:331–337  ·  view source on GitHub ↗

Return true if the object is an asynchronous generator function. Asynchronous generator functions are defined with "async def" syntax and have "yield" expressions in their body.

(obj)

Source from the content-addressed store, hash-verified

329 return _has_code_flag(obj, CO_COROUTINE) or _has_coroutine_mark(obj)
330
331def isasyncgenfunction(obj):
332 """Return true if the object is an asynchronous generator function.
333
334 Asynchronous generator functions are defined with "async def"
335 syntax and have "yield" expressions in their body.
336 """
337 return _has_code_flag(obj, CO_ASYNC_GENERATOR)
338
339def isasyncgen(object):
340 """Return true if the object is an asynchronous generator."""

Callers

nothing calls this directly

Calls 1

_has_code_flagFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…