Message336046
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? |
|
Date |
User |
Action |
Args |
2019-02-20 07:10:16 | Dan Rose | set | recipients:
+ Dan Rose, rhettinger, asvetlov, yselivanov, eamanu |
2019-02-20 07:10:16 | Dan Rose | set | messageid: <1550646616.6.0.566402882778.issue36045@roundup.psfhosted.org> |
2019-02-20 07:10:16 | Dan Rose | link | issue36045 messages |
2019-02-20 07:10:16 | Dan Rose | create | |
|