The aforementioned syntax is still supported in newer versions of Python 3, but it is recommended to use await and async if there's no need to support for Python 3.3-3.4. You can refer back to this documentation, here's a short snippet: 协程的async def类型是在Python 3.5中添加的,它是 如果不需要支持较旧的Python版本,则建议使用. The async def type of coroutine was added in Python 3.5, and is recommended if there is no need to support older Python versions.在旁边: discord.py 的问题支持3.4.2-3.6.6,(自2019年1月起不支持3.3-3.4.1,3.7 ).Aside:discord.py currently supports 3.4.2-3.6.6, (It does not support 3.3-3.4.1, 3.7 as of January 2019).对于使用discord.py进行开发,我建议使用discord.py重写分支:For developing with discord.py, I suggest using the discord.py rewrite branch: discord.py-重写支持3.5.3-3.7.discord.py-rewrite supports 3.5.3-3.7. 这篇关于带有异步def的Python [无效语法]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-23 05:52
查看更多