[issue34380] Relax Restrictions on await?

2018-08-11 Thread Steven Silvester
Steven Silvester added the comment: Thanks for your consideration and for implementing the original feature! -- ___ Python tracker ___

[issue34380] Relax Restrictions on await?

2018-08-11 Thread Yury Selivanov
Yury Selivanov added the comment: This isn't something we want to do in Python. We have a dynamic but strict type system. 1 + '1' is an error in Python, but works just fine in JavaScript. Likewise, in 'await foo' foo is expected to be an awaitable in Python and not anything else. This has

[issue34380] Relax Restrictions on await?

2018-08-11 Thread Steven Silvester
New submission from Steven Silvester : When writing an `async` function, we often want to `await` a method call that may or may not be `async`. For instance, it may be synchronous in the base class, but asynchronous in the subclass on the instance we have been given. It would be nice for