title: inheritance in Python deletes the original value
body: <p>I have programmed a small inheritance problem in Python:</p>
  
  <pre><code>class Worker:
  
  
      def __init__(self,cod):
          self.cod=cod
          self.wage=0
  
  class FactoryWorker(Worker):
      def __init__(self,cod,wage):
          Worker.__init__(self,cod,wage)
          Worker.wage=wage*1.10
  
      def printWage(self):
          return Worker.wage
  
  class OfficeWorker(Worker):
      def __init__(self,cod,payperHour,numberHours):
          Worker.__init__(self,cod)
          self.payperHour=payperHour
          self.numberHours=numberHours
  
      def printWage(self):
          Worker.wage=self.payperHour*self.numberHours
          return Worker.wage
  </code></pre>
  
  <p>The problem that I have is when I make a couple of objects:</p>
  
  <pre><code>w1=FactoryWorker(2130,4000)
  w1.printWage()
  
  prints 4400
  
  w2=OfficeWorker(1244,50,100)
  w2.printWage()
  
  prints 5000
  </code></pre>
  
  <p>but if I do again:</p>
  
  <pre><code>w1.printWage()
  </code></pre>
  
  <p>it does not print the original 4400, but it prints instead 5000</p>
  
  <p>why is that? I want the variable wage to be declared as an attribute of the class Worjer and not individually in each one of the subclasses.</p>
  
  <p>Any help?</p>