I created many instances of a PlotHandler
class. An instance must keep it\'s variables private. But the way I managed them led to a hard to detect problem,
See this question, this one, and tons of other stuff you can find by googling "Python class variables shared", "Python FAQ class variables", etc.
The short answer is: variables defined directly in the class body are class variables, not instance variables, and are thus shared among instances of the class. If you want instance variables you must assign them from within a method, where you have access to self
.