My questions are:
- (how) can I determine if a function is a coroutine without checking its return value in micropython?
- how is the async keyword handled in micropython (more of a question for curiosity as above Q would solve my issues)
Code: Select all
def iscoroutinefunction(obj):
"""Return true if the object is a coroutine function.
Coroutine functions are defined with "async def" syntax.
"""
return _has_code_flag(obj, CO_COROUTINE)