title: Passing variables, creating instances, self, The mechanics and usage of classes: need explanation
body: <p>I just rewrote a working program into functions in a class and everything messed up.</p>
  <p><strong>First</strong>, in the <code>__init__</code> section of the class I declared a bunch of variables with <code>self.variable=something</code>.</p>
  <p>Should I be able to access/modify these variables in every function of the class by using <code>self.variable</code> in that function? In other words, by declaring <code>self.variable</code> I have made these variables, global variables in the scope of the class right?</p>
  <p>If not, how do I handle self?</p>
  <p><strong>Second</strong>, how do I correctly pass arguments to the class?</p>
  <p><strong>Third</strong>, how do I call a function of the class outside of the class scope?</p>
  <p><strong>Fouth</strong>, how do I create an Instance of the <code>class INITIALCLASS</code> in another <code>class OTHERCLASS</code>, passing variables from <code>OTHERCLASS</code> to <code>INITIALCLASS</code>?</p>
  <p>I want to call a function from <code>OTHERCLASS</code> with arguments from <code>INITIALCLASS</code>. What I've done so far is.</p>
  <pre><code>class OTHERCLASS():
      def __init__(self,variable1,variable2,variable3):
          self.variable1=variable1
          self.variable2=variable2
          self.variable3=variable3
      def someotherfunction(self):
          something=somecode(using self.variable3)
          self.variable2.append(something)
          print self.variable2
      def somemorefunctions(self):
          self.variable2.append(variable1)
          
  class INITIALCLASS():
      def __init__(self):
          self.variable1=value1
          self.variable2=[]
          self.variable3=''
          self.DoIt=OTHERCLASS(variable1,variable2,variable3)
  
      def somefunction(self):
          variable3=Somecode
          #tried this
          self.DoIt.someotherfunctions()
          #and this
          DoIt.someotherfunctions()
  </code></pre>
  <p>I clearly didn't understand how to pass variables to classes or how to handle <code>self</code>, when to use it and when not. I probably also didn't understand how to properly create an instance of a class. In general I didn't understand the mechanics of classes so please help me and explain it to me like I have no idea (which I don't, it seems). Or point me to a thorough video, or readable tutorial.</p>
  <p>All I find on the web is super simple examples, that didn't help me much. Or just very short definitions of classes and class methods instances etc.</p>
  <p>I can send you my original code if you guys want, but its quite long.</p>