为什么不能在 f-strings 中使用“await”?有没有办法强制 f 字符串在协程函数的上下文中评估格式表达式?
$ python3
Python 3.6.0 (default, Mar 4 2017, 12:32:37)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> async def a(): return 1
...
>>> async def b(): return 'The return value of await a() is {}.'.format(await a())
...
>>> async def c(): return f'The return value of await a() is {await a()}'
...
File "<fstring>", line 1
(await a())
^
SyntaxError: invalid syntax