Magic Optimisation

simonwittber at gmail.com simonwittber at gmail.com
Mon Sep 5 00:10:23 EDT 2005


I guess it is hard to see what the code is doing without a complete
example.

The StopIteration is actually raised by task.next(), at which point
task is removed from the list of generators (self.pool). So the
StopIteration can be raised at any time.

The specific optimisation I am after, which will clean up the code a
lot, is a way to auto-magically create self_attribute local variables
from self.attribute instance variables.

Sw.




More information about the Python-list mailing list