This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dan Rose
Recipients Dan Rose, asvetlov, eamanu, rhettinger, yselivanov
Date 2019-02-20.07:10:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550646616.6.0.566402882778.issue36045@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2019-02-20 07:10:16Dan Rosesetrecipients: + Dan Rose, rhettinger, asvetlov, yselivanov, eamanu
2019-02-20 07:10:16Dan Rosesetmessageid: <1550646616.6.0.566402882778.issue36045@roundup.psfhosted.org>
2019-02-20 07:10:16Dan Roselinkissue36045 messages
2019-02-20 07:10:16Dan Rosecreate