On Sat, Mar 20, 2021 at 2:35 PM Guido van Rossum <gu...@python.org> 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. Yury
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/ZEACYVZYCTPZ5PYTLOWGYXB5WAUHTFNO/ Code of Conduct: http://python.org/psf/codeofconduct/