[New-bugs-announce] [issue25888] awaiting on coroutine that is being awaited should be an error

Yury Selivanov report at bugs.python.org
Wed Dec 16 16:51:12 EST 2015


New submission from Yury Selivanov:

This problem was discussed in one of the asyncio issues here: https://github.com/python/asyncio/issues/288

I propose to raise a RuntimeError if an 'await' expression is used for a coroutine object that's being awaited on already.  This change shouldn't impact performance in any way.  It will prevent users from writing code that behaves in a very weird ways (see the github link for an example).

----------
assignee: yselivanov
components: Interpreter Core
messages: 256539
nosy: asvetlov, gvanrossum, haypo, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: awaiting on coroutine that is being awaited should be an error
type: enhancement
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25888>
_______________________________________


More information about the New-bugs-announce mailing list