On Mon, 03 Nov 2008 21:09:58 +0000, Jorgen Grahn wrote: > Why multi-threading? I see no concurrency in the original algorithm. > There is, in my mind, nothing concurrent about 'yield'.
No "real" concurrency but a generator can be seen as independent thread of code where the generator code is allowed to run when `next()` is called and stops itself when it ``yield``\s an object. Sort of cooperative multitasking. The name "yield" is often used in concurrent code like Java's or Io's `yield()` methods. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list