4 ms·
This is directly addressed in the PEP [1] - the short of it is, without the `async` modifier if you have two functions: def important(): await someth
by svieira 11y ago
This is directly addressed in the PEP [1] - the short of it is, without the `async` modifier if you have two functions:
def important():
await something()
def something():
# ... stuff ...
await something_else()
# ... more stuff ...
and you refactor `await something_else()` into a new method then you've changed the return type of `something` from `Awaitable[ReturnType]` to just `ReturnType` and `important` will break at run-time when it tries to `await something()`.
[1]: https://www.python.org/dev/peps/pep-0492/#importance-of-async-keyword