python异步编程 报错:module 'asyncio' has no attribute 'coroutine'
import asyncioasync def hello(name): print('Hello,', name)# 定义协程对象coroutine = hello("World")# 定义事件循环对象容器loop = asyncio.get_event_loop()# task = asyncio.ensure_future(coroutine)# 将协程转为t...
原创
2019-03-16 15:47:40 ·
6913 阅读 ·
0 评论