考慮Python 文檔中的這個示例:def gen(): # defines a generator function yield 123async def agen(): # defines an asynchronous generator function yield 123我知道這個例子很簡單,但是我可以做什么gen,不能做什么agen,反之亦然?我會以什么方式注意到它們的不同?有關的:我認為這個問題會有所幫助,但我仍然不明白: What are the differences between the purposes of generator functions and asynchronous generator functions
添加回答
舉報
0/150
提交
取消