我读了木星教程Index
试过了
In [15]: print('before sleep'); sleep(12); print('after sleep')
before sleep
/home/me/anaconda3/bin/ipython:1: RuntimeWarning: coroutine 'sleep' was never awaited
#!/home/me/anaconda3/bin/python
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
after sleep
对警告很困惑
这个错误意味着函数(实际上是一个协程)“sleep”从未执行过。在
尝试将其替换为:
否则,只需使用非异步睡眠方法:
^{pr2}$祝你好运!在
相关问题 更多 >
编程相关推荐