TypeError from Python 3 async for loop

前端 未结 1 760
野的像风
野的像风 2021-01-28 08:09

I\'m learning about Python\'s relatively new async features. I found this in PEP 492:

The following is a utility class that transforms a regular iterable

相关标签:
1条回答
  • 2021-01-28 08:35

    The code you are using works with python 3.5.2+.

    From Python 3.5.2 __aiter__ can directly return asynchronous iterators. More here

    The error you were receiving was because of the older python(3.5.1) and it was therefore returning the wrong type.

    0 讨论(0)
提交回复
热议问题