By fholmstrom
via loveandtheft.org
Published: Aug 31 2008 / 19:46
Generators is a concept that was introduced in Pyethon at version 2.2, back then they were unidirectional that only allowed information to be passed out of the generator and not back into it, which limited their use to simple iterators and not much else. This was changed / enhanced in Python 2.5 when both data and exceptions now can be passed back into to generator. The changes made in 2.5 allowed for generators to be used as coroutines enabling them to function in complex event-driven programming such as asynchronous I/o, games, etc.
SaveShareSend
Tags: how-to, methodology, open source, python
Add your comment