Getting name error: name Self is not defined while using Twisted in Python. How to remove this error?
<pre><code>def mention_notifier(self):
    print self.stat_old


if __name__ == "__main__":
    import sys
    self.stat_old = Set([])
    l = task.LoopingCall(mention_notifier).start(timeout)
</code></pre>

<p>This is the basic skeleton of my code. I want stat_old to be a global variable that doesn't get re intialized every time I call mention_notifier. Thus, I did something like this. But got this error of 'self' not defined. Any clues how to go about this?</p>
