Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66354 > unrolled thread
| Started by | Nick Timkovich <prometheus235@gmail.com> |
|---|---|
| First post | 2014-02-14 20:57 -0600 |
| Last post | 2014-02-14 20:57 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Re: Generator using item[n-1] + item[n] memory Nick Timkovich <prometheus235@gmail.com> - 2014-02-14 20:57 -0600
| From | Nick Timkovich <prometheus235@gmail.com> |
|---|---|
| Date | 2014-02-14 20:57 -0600 |
| Subject | Re: Generator using item[n-1] + item[n] memory |
| Message-ID | <mailman.6952.1392433921.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
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!
Back to top | Article view | comp.lang.python
csiph-web