title: Declaring new variables inside class methods
body: <p>I just read about class and method variables in Python, and I am wondering if there is a difference between these two examples:</p>
  
  <pre><code>class Example(object):
      def __init__(self, nr1, nr2):
          self.a = nr1
          self.b = nr2
  
      def Add(self):
          c = self.a + self.b
          return c
  
  class Example2(object):
      def __init__(self, nr1, nr2):
          self.a = nr1
          self.b = nr2
  
      def Add(self):
          self.c = self.a + self.b
          return self.c
  </code></pre>
  
  <p>Basically if I do:</p>
  
  <pre><code>print Example(3,4).Add()
  print Example2(3,4).Add()
  </code></pre>
  
  <p>I get the same result:</p>
  
  <pre><code>7
  7
  </code></pre>
  
  <p>So my questions are:</p>
  
  <ol>
  <li>What is the difference between <code>self.c = self.a + self.b</code> and <code>c = self.a + self.b</code>?</li>
  <li>Should all new variables declared inside classes be declared with the <code>self</code> statement?</li>
  </ol>
  
  <p>Thanks for any help!</p>