You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
builtins.aiter can be implemented quite easy with just a few lines of code.
but for builtins.anext, it seems anext_awaitable must be implemented first.
Thanks for the "good for issue". I am probably misunderstanding things.
the slots for tp_as_async->am_aiter is missing. According to cpython that would be the correct way to check if the object has __aiter__ implementaed, Is this the correct way to proceed, probably an outline of how this could be done would be great
@sum12 you are right. that's the right way. But instead of the right way, you can implement it by calling __aiter__ directly.
If you are interested in the right way, You can do it by looking at other slots, like IterNext or Callable. The right way would not be the 'good first issue'.
hey @youknowone@sum12@Snowapril , i see builtins.anext is still not implemented, however builtins.aiter is. is it possible for me to take on this issue? from what I have understood, I think anext calls the aiter to fetch an async iterator which is then processed in the anext func. I'm assuming I can use this as a starting point to model anext_awaitable.
Activity
Snowapril commentedon Apr 14, 2022
builtins.aitercan be implemented quite easy with just a few lines of code.but for
builtins.anext, it seemsanext_awaitablemust be implemented first.sum12 commentedon Apr 17, 2022
Thanks for the "good for issue". I am probably misunderstanding things.
the slots for
tp_as_async->am_aiteris missing. According to cpython that would be the correct way to check if the object has__aiter__implementaed, Is this the correct way to proceed, probably an outline of how this could be done would be greatyouknowone commentedon Apr 18, 2022
@sum12 you are right. that's the right way. But instead of the right way, you can implement it by calling
__aiter__directly.If you are interested in the right way, You can do it by looking at other slots, like
IterNextorCallable. The right way would not be the 'good first issue'.implement aiter
implement aiter
implement aiter
sidx04 commentedon May 26, 2025
hey @youknowone @sum12 @Snowapril , i see
builtins.anextis still not implemented, howeverbuiltins.aiteris. is it possible for me to take on this issue? from what I have understood, I thinkanextcalls theaiterto fetch an async iterator which is then processed in theanextfunc. I'm assuming I can use this as a starting point to modelanext_awaitable.Any guidance would be appreciated!
Added miniml anext() implementation
Added miniml anext() implementation
Added miniml anext() implementation
Implement minimal builtins.anext()
youknowone commentedon Dec 25, 2025
Thanks @sum12 and @YashSuthar983 ! this is done!
Thanks @Snowapril for advices