title: twisted loopingcall access class vars
body: <p>I have the following example</p>
  
  <pre><code>class Intake:
      def __init__(self):
  
          #
          # aggregate dict to store all the counters
          #
          self.counters = {}
  
          #
          # start a looping call to run reach minute
          #
          self.lc = task.LoopingCall(self.aggregate, self.counters)
          self.lc.start(60)
  
  
      def aggregate(self, counters):
          print counters
  </code></pre>
  
  <p>So that works just fine.. but in my aggregate function I need to clear out the self.counters dict. I'm having issues doing this..</p>
  
  <p>I want to do something like</p>
  
  <pre><code>    def aggregate(self, counters):
          print counters
  
          self.counters = {}
  </code></pre>
  
  <p>If I reference self.counters in that function I get </p>
  
  <pre><code>exceptions.AttributeError: Intake instance has no attribute 'counters'
  </code></pre>