bpo-36045: builtins.help() now prefixes async for async functions by rotu · Pull Request #12010 · python/cpython (original) (raw)

We have no prefix for regular generator functions.
I think the same rule is applied to async version.

I'm sorry - I don't think I understand what you are saying. Which same rule is applied?

A plain async function is different: there is a clear vision that the function should be called with await syntax.

Why should await matter in particular? You don't call an async generator with await syntax - you use async for syntax (which also requires you to know the callee is meant to be used asynchronously). In the output of help, "async" just means async def ... was used to declare the callable. You might still need await, even for a regular function, as with def mysleep(): return asyncio.sleep(10).

If upon reading the above, you still feel strongly that async generator functions should not be prefixed with "async", I'll be happy to make that change.