title: write a class in python that accepts parameteres
body: <p>I am writing a simple class that will basically accept 3 parameters, execute a series of commands and return the result.</p>
  
  <p>Now the problem is that i am not clear about how to write a proper class in Python (i use C++ mainly); so is kinda weird for me to figure out what and how to write the class.</p>
  
  <p>I have 3 parameters: name, classID and objectType (all 3 strings type), i need to return a string with the results of the operation.</p>
  
  <p>So far I wrote this:</p>
  
  <pre><code>class testClass(superclass):
  
  def __init__(self, name="",classID="", objectType="" *kwargs):
  
      superclass.__init__(self, args, **kwargs)
  
      result = ""
      ...(do the operation with the parameters, if the result is positive return OK
          otherwise return KO)
  </code></pre>
  
  <p>Then i saved it as testClass.py and imported it in my main python program</p>
  
  <p>The issue is that when i pass parameters i get an error saying that the global name "args" is not defined, on the superclass __init line</p>
  
  <p>In C I would just write something like </p>
  
  <pre><code>class testClass 
  {
      string name, classID, objectType;
  }string
  </code></pre>
  
  <p>and the program would know that it must expect 3 parameters (and then deal in the constructor with the data verification and validation), but i cannot grasp how you tell Python the same thing.</p>
  
  <p>If i can get to understand how to use Python in the way that it should be (and not translating code from a language to another), maybe i can avoid to get stuck like in this case :)</p>
  
  <p>Any help is appreciate to shed some light on the subject.</p>