Compilation for `async for` comprehensions is not yet implemented
i.e. [x async for y in z]. There's an unimplemnted!("async for comprehensions") in compiler/src/compile.rs, which is where an implementation could start out. Take a look at how normal compile_for works for async and how compile_for's non-async implementation is structured somewhat similarly to compile_comprehension.
@coolreader18 I'm looking into this, not committing to when I can implement it. However, I was wondering if there was a good guide for the Instruction enum? I can generally get an idea for each operation. However, I have never really worked on a programming language, so a guide, definition, or something would be amazing.
@aaronclong ah, we don't really have that, the closest thing would be doc comments on the enum variants but there aren't many. That's definitely something to improve. However, you can check the CPython docs for the dis module, we share many of the same instructions (although renamed to CamelCase, obviously) and you can usually check how CPython compiles things using dis.dis() for inspiration for how to do it in our compiler
If no one is working on this issue, can I take this issue?
@aaronclong are you available to finish this up?
#5276 adds basic async for comprehension support. but still missing lots of features. Including compile error (test_asyncgen.test_async_gen_expression_02) and runtime error (test_asyncgen.test_async_gen_expression_01)