A Welcome Syntax
A Welcome Syntax
Posted Apr 22, 2025 12:19 UTC (Tue) by farnz (subscriber, #17727)In reply to: A Welcome Syntax by intelfx
Parent article: Template strings accepted for Python 3.14
I would propose making await "more functiony" in a Python world; writing await foo is shades of Python 2's print foo, which became print(foo) in Python 3. So, make await foo become await(foo).
Once you've done that, there's less need for the async keyword (since Python is dynamically typed, so you don't need the type signature to tell you whether this thing is a function or a coroutine), so I'd also be tempted to remove the async keyword in Python; await(…) becomes syntax for "this thing takes part in coroutine scheduling at this point", and have the decision about whether a function is async or not be made based on whether or not it contains a await(…) in the body.
