QUERY · ISSUE
Extend obj->iternext to handle not just __next__(), but also send() method
rfc
For generators (generalization of iterators), .__next__() method is defined as .send(None). It's only natural to extend C-level ->iternext() method to accept send argument, to allow implementation of C-level generators optimally. Caveat: so far, none of such exist. But work on optimizing uasyncio may lead to need for such. Or maybe not, maybe "virtual" awaitable methods will be used instead: https://github.com/micropython/micropython/issues/2622 .
This ticket is created to be referenced by in-code TODO comments (yes, I think we reached that code complexity that need to reference tickets straight from code).
CANDIDATE · PULL REQUEST
Implement send() method for generators.
Again poking at stuff I don't understand... After plugging some segfaults, even seems to work ;-).