The Polish Dispatch<p>I need some obscure python help, fellow mastodonians:</p><p>I have a nested async function inside a regular function.</p><p>I need to test whether to await on it inside a decorator, but neither of `inspect` or `asyncio` helpers work, and .__code__.co_flags do not indicate it being a coroutine/awaitable/...</p><p>Right now I've added a flag to my decorator to manually control wrapped function behavior, but it's just a workaround.</p><p>Any tips? Thanks.</p><p><a href="https://mstdn.social/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> <a href="https://mstdn.social/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a> <a href="https://mstdn.social/tags/coroutine" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>coroutine</span></a> <a href="https://mstdn.social/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://mstdn.social/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://mstdn.social/tags/fedihelp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fedihelp</span></a></p>