title: List as global variable inside a class in Python
body: <p>I get this error when I set the list numbers as a global variable inside a class. Here is my code:</p>
  
  <pre><code>class SomeClass:
  
    numbers = [4, 6, 8, 2, 10] 
  
    def incrementNumbers(self):
      global numbers   
  
      for i in numbers:
        i += 1
        print (i)
  
  someObject = SomeClass()
  
  someObject.incrementNumbers()
  </code></pre>
  
  <p>When I run the code i get the error "name 'numbers' is not defined". If I declared 'numbers' as global, why is considered not defined? </p>