[issue46622] Support decorating a coroutine with functools.cached_property

Andrew Svetlov report at bugs.python.org
Sun Feb 13 10:10:57 EST 2022


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

I have a design question.
Does `print(await a.hello)` look awkward?
I'm not speaking about correction.

In asyncio code I have seen before, `await val` means waiting for a future object. `await func()` means async function call.

`await obj.attr` looks more like a future waiting but, in fact, it is not.
Should we encourage such syntax?
I have no strong opinion here and like to hear other devs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46622>
_______________________________________


More information about the Python-bugs-list mailing list