MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / iscoroutinefunction

Function iscoroutinefunction

tools/python-3.11.9-amd64/Lib/inspect.py:409–414  ·  view source on GitHub ↗

Return true if the object is a coroutine function. Coroutine functions are defined with "async def" syntax.

(obj)

Source from the content-addressed store, hash-verified

407 return _has_code_flag(obj, CO_GENERATOR)
408
409def iscoroutinefunction(obj):
410 """Return true if the object is a coroutine function.
411
412 Coroutine functions are defined with "async def" syntax.
413 """
414 return _has_code_flag(obj, CO_COROUTINE)
415
416def isasyncgenfunction(obj):
417 """Return true if the object is an asynchronous generator function.

Callers 1

wrapFunction · 0.90

Calls 1

_has_code_flagFunction · 0.85

Tested by

no test coverage detected