Wolfgang> So basically if I want to write a long-running program in
Wolfgang> Python, it would make sense to code all functions that are
Wolfgang> likely to be called more than once as generators...
Skip> If they need to resume their calculations from where they left off
Skip> after the last yield.
Bengt> Hm, I wonder how (all untested)
...
Bengt> would compare to
...
I was thinking about things like complex tokenizers. Take a look, for
example, at the SpamBayes tokenizer and think about how to implement it
without yield. Clearly it can be don (and not all that difficult). Still,
I think the generator version would be easier to understand and modify.
Skip
--
http://mail.python.org/mailman/listinfo/python-list