On Sat, Mar 20, 2021 at 2:35 PM Guido van Rossum email@example.com wrote:
However I'm still skeptical about the two-argument version of aiter() (see my previous message about this). Do you have any indication that a use case for that exists?
In my experience this isn't a popular feature. Now that I looked into the docs, I *think* I remember using it once myself. Generally if I need this functionality I'd just write a simple generator. Not that this is a definitive indicator of the popularity of this thing; I'm just sharing my experience.
That said I wouldn't mind aiter() supporting the two-arguments mode as it could make it easier to convert some sync code bases (that use greenlets, for example) to async. And given that async iteration mirrors the sync iteration protocol pretty closely, I think that aiter() fully mirroring iter() is expected. I do realize that my arguments here are weak, so my vote is +0 to support the two-arguments mode.