title: __init__ method of python class
body: <p>I have a python class,called settings, which includes an <code>__init__</code> method for setting some values as below:</p>
  
  <pre><code>class settings:
      global appkey
      global appversion
      def __init__(self):
          appkey = 1
          appversion = 1
          applicationname = "app1"
          applicationfile = "app.txt"
  </code></pre>
  
  <p>In another python file(main script), I define an instance of my settings class via this codes:</p>
  
  <pre><code>import settings
  from settings import settings
  set = settings()
  print set.appversion
  print set.appkey
  print set.applicationfile
  </code></pre>
  
  <p>But when I run my main python script, I got this error:</p>
  
  <pre><code>AttributeError: settings instance has no attribute 'appversion'
  </code></pre>
  
  <p>I expect that when I am defining an instance of a class, settings class here, its <strong>init</strong> function will be triggered and I will have values for its attributes.</p>