Yury Selivanov <yseliva...@gmail.com> 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 been discussed multiple times during PEP 492 approval 
process.

I've been beaten myself by lose semantics of await in JS by awaiting a function 
that returned null—a simple bug that turned out to be a nightmare to identify 
in a complex system.

So unfortunately I have to close this one as "won't fix", sorry. Thank you for 
suggesting the idea though.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
type:  -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34380>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to