title: Updating Class variable within a instance method
body: <pre><code>class MyClass:
      var1 = 1
  
      def update(value):
          MyClass.var1 += value
  
      def __init__(self,value):
          self.value = value
          MyClass.update(value)
  
  a = MyClass(1)
  </code></pre>
  
  <p>I'm trying to update a class variable(<strong>var1</strong>) within a method(<strong>_<em>init</em>_</strong>) but I gives me:</p>
  
  <pre><code>TypeError: unbound method update() must be called with MyClass instance as first argument (got int instance instead)
  </code></pre>
  
  <p>I'm doing this because I want easy access to all variables in a class by calling print MyClass.var1</p>