[issue36045] builtins.help function is not much help with async functions

Dan Rose report at bugs.python.org
Wed Feb 20 02:10:16 EST 2019


Dan Rose <daniel.buchoff at gmail.com> added the comment:

Thanks for the suggestion, Raymond. I was toying with the idea of a PR, but wasn’t sure what the resolution should be, and it’s a rather subtle decision for my first contribution.

It seems to me that this might be an oversight in PEP-0484, and the purest resolution is that either Generator and Coroutine should both be part of the type signature or neither should be.

If the PEP is indeed correct, the help output *could* look like:

async the_answer2() -> int

Which would be equivalent to the (functionally identical) wrapper:

the_answer3() -> Awaitable[int]


Philosophically, does asyncness belong on the left or right of the arrow? Should it change just because of how the function is expressed?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36045>
_______________________________________


More information about the Python-bugs-list mailing list