
Nov. 29, 2021
11:34 a.m.
Steven D'Aprano wrote:
Does anyone know what builtin or stdlib objects iterators fail to implement `__iter__`? I haven't been able to find any -- all the obvious examples do (map, filter, reversed, zip, generators, list iterators, set iterators, etc). Could it possibly be... the async iterator family? Those beasts have __aiter__ and __anext__ methods. https://docs.python.org/3/reference/datamodel.html#asynchronous-iterators