Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66354
| From | Nick Timkovich <prometheus235@gmail.com> |
|---|---|
| Date | 2014-02-14 20:57 -0600 |
| Subject | Re: Generator using item[n-1] + item[n] memory |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6952.1392433921.18130.python-list@python.org> (permalink) |
[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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Generator using item[n-1] + item[n] memory Nick Timkovich <prometheus235@gmail.com> - 2014-02-14 20:57 -0600
csiph-web