Generator using item[n-1] + item[n] memory

Nick Timkovich prometheus235 at gmail.com
Sat Feb 15 03:57:31 CET 2014


Ah, I think I was equating `yield` too closely with `return` in my head.
 Whereas `return` results in the destruction of the function's locals,
`yield` I should have known keeps them around, a la C's `static` functions.
 Many thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140214/84068a34/attachment.html>


More information about the Python-list mailing list