not enough arguments passed to __init__()
<p>What is the error below? Also, is there a better way to implement the following classes?</p>

<pre><code>     #!/usr/bin/python

     class Datacenters:
        def __init__(self,name,location,cpu,mem):
           self.name=name
           self.location=location
           self.cpu=cpu
           self.mem=mem

        def  getparam(self):
           return self.name,self.location ,self.cpu,self.mem

        def  getname(self):
           return self.name

     class WS(Datacenters):
        def __init__(self,name,location,cpu,mem,obj):
           #datacentername = Datacenters.__init__(self) #To which data center it is associated
           self.dcname =obj.name #To which data center it is associated

           Datacenters.__init__(obj,name,location,cpu,mem)

        def getparam(self,obj):
           self.name,self.location ,self.cpu,self.mem = obj.getparam()
           print self.dcname
           #return self.name,self.location ,self.cpu,self.mem,obj.name

        def  getwsname(self):
           return self.name

     class Pcs(WS):
        def __init__(self,name,location,cpu,mem,obj):
           self.wsname = obj.getwsname() #To which WS it is  associated
           WS.__init__(obj,name,location,cpu,mem)

        def  getparam(self,obj):
           print obj.getparam()
           print self.wsname


     a = Datacenters("dc1","Bl1",20,30)
     print a.getparam()
     b = WS("WS1","Bl1",21,31,a)
     print b.getparam(a)
     c = Pcs("PC1","Bl1",20,30,b)
     #print c.getparam(b)
</code></pre>

<p>output:</p>

<pre><code>   Press ENTER or type command to continue 
   ('dc1', 'Bl1', 20, 30)
   dc1
   None
   Traceback (most recent call last):
   File "class1.py", line 45, in &lt;module&gt;
   c = Pcs("PC1","Bl1",20,30,b)
   File "class1.py", line 34, in __init__
   WS.__init__(obj,name,location,cpu,mem)
   TypeError: __init__() takes exactly 6 arguments (5 given)
</code></pre>
