Message258065
Sorry, dropping the "was" was a typo (I should have copied & pasted it instead of rewriting).
From the point of view of the error message, the reason I changed my suggestion was because I liked your idea of optimising it for the "only using await" case and trusting that the folks delving into the lower level plumbing of calling methods manually can figure it out. Anything that mentions await *at all* will be wrong in some cases, since what we're actually reporting is an attempt to resume (by some means) a coroutine that was previously terminated (by some means).
That is, "Cannot resume terminated coroutine" is always accurate, but relies on the reader knowing that "await" both resumes a coroutine and waits for it to terminate.
"Coroutine was previously awaited on" may be wrong about how the coroutine was originally terminated, but at least hints that the error may be related to awaiting the coroutine.
"Cannot resume previously awaited coroutine" would be inaccurate under the same circumstances.
"Cannot await previously awaited coroutine" would only be entirely accurate for "double await" errors, but doesn't rely on the reader making any assumptions at all in that case.
(The bulk of the problem here is that my brain is happy to accept "awaited" as a novel adjective modifying "coroutine", but balks at "awaited" as a verb or "awaited on" as a verb phrase. I'm extrapolating from that to guess that other folks would find the verb form similarly jarring) |
|
Date |
User |
Action |
Args |
2016-01-12 05:39:36 | ncoghlan | set | recipients:
+ ncoghlan, gvanrossum, brett.cannon, vstinner, asvetlov, martin.panter, yselivanov |
2016-01-12 05:39:36 | ncoghlan | set | messageid: <1452577176.18.0.446696366009.issue25887@psf.upfronthosting.co.za> |
2016-01-12 05:39:36 | ncoghlan | link | issue25887 messages |
2016-01-12 05:39:35 | ncoghlan | create | |
|