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

Nick Timkovich prometheus235 at
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: <>

More information about the Python-list mailing list