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 yselivanov
Recipients asvetlov, brett.cannon, gvanrossum, martin.panter, ncoghlan, vstinner, yselivanov
Date 2016-01-12.01:43:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452563023.39.0.668331723407.issue25887@psf.upfronthosting.co.za>
In-reply-to
Content
Nick,

> After all, waiting for the result with "await" is only one way to terminate a coroutine - you can also get there with direct calls to next(), send(), throw() and close().

Yes, but I expect that almost nobody will use 'send', 'throw' etc on coroutines, it's too low level.  In asyncio there is only one place where this magic happens.  Regular user will only understand the 'await' part -- that's why I wanted to mention it in the error message.

  async def something():
      await coro
      ^ RuntimeError('Cannot resume terminated coroutine')

The above use case might be a bit hard for users to actually understand, as opposed to

  async def something():
      await coro
      ^ RuntimeError('coroutine was already awaited on')

What do you think?

Martin, thanks for the review!
History
Date User Action Args
2016-01-12 01:43:43yselivanovsetrecipients: + yselivanov, gvanrossum, brett.cannon, ncoghlan, vstinner, asvetlov, martin.panter
2016-01-12 01:43:43yselivanovsetmessageid: <1452563023.39.0.668331723407.issue25887@psf.upfronthosting.co.za>
2016-01-12 01:43:43yselivanovlinkissue25887 messages
2016-01-12 01:43:43yselivanovcreate