3 ms·
Is there an explanation of how Python yield is implemented?
by keveman 15y ago
Is there an explanation of how Python yield is implemented?
- Luyt 15y agoYes. See http://docs.python.org/reference/simple_stmts.html#grammar-token-yield_stmt http://docs.python.org/reference/simple_stmts.html#grammar-t... , and the source code is pretty well commented: http://svn.python.org/view/python/trunk/Objects/genobject.c?view=markup http://svn.python.org/view/python/trunk/Objects/genobject.c?...