[Wording]: “Awaiting on a coroutine.”
e-yi opened this issue · 1 comments
e-yi commented
Python Version
3.12
Docs Page
https://docs.python.org/zh-cn/3.12/library/asyncio-task.html#coroutine
Original Translation
要实际运行一个协程,asyncio 提供了以下几种机制:
-
asyncio.run() 函数用来运行最高层级的入口点 "main()" 函数 (参见上面的示例。)
-
等待一个协程。以下代码段会在等待 1 秒后打印 "hello",然后 再次 等待 2 秒后打印 "world":
Original Docs Paragraph
To actually run a coroutine, asyncio provides the following mechanisms:
-
The asyncio.run() function to run the top-level entry point “main()” function (see the above example.)
-
Awaiting on a coroutine. The following snippet of code will print “hello” after waiting for 1 second, and then print “world” after waiting for another 2 seconds:
Suggested Fix
建议修改第二点中awaiting的翻译,await在此处或许应被理解成代码关键字,而不是直接翻译为“等待”,后者令我在看文档时疑惑了一阵。可以比如将第二句修改为“对协程执行await”
silkriver commented
fixed