Generators are objects that store the stack and state of a function call in response to a yield statement. They can then be called to restore the previous state of that function call. The function will resume execution just after the last yield statement. A generator will exit when a return statement is encountered. You can do that explicitly or just let the function exit normally.
Category Archives: Tips
One of the newest features of Pika added in version 0.10.1 is the runtime annotation syntax. These annotations are placed before function, class, property and package declarations. They can be stacked, with the one closest to the declaration (or subject) being the first called and the one furthest called last.