title: How can I make the changing without lose the knowledges in inheritance class?
body: <p>When I added the function to the <code>inheritance class</code> I don't want to lose the datas in <code>manager1</code> like <code>John Wood</code> <code>3000</code>, but when I added <code>raise_wage</code> function to <code>manager(worker)</code>, I equalled <code>manager2</code> to <code>manager(&quot;John Wood&quot;,3000,&quot;IT&quot;)</code>, when I made this, I didn't use <code>manager1</code> and I lost <code>manager1</code> changings. For example I wrote <code>(&quot;John Wood&quot;,3000,&quot;IT&quot;)</code> knowledges again at the end of the code and I lost departmand knowledges like <code>marketing</code>. How can I add the function like <code>raise_wage</code> and I don't lose the data like <code>marketing</code>?
  At the end of the code <code>#manager2</code> parts are the codes that I don't want to write, but to add the <code>raise_wage</code> I had to add <code>#manager2</code> parts. I don't want to create <code>manager2</code> I want to protect <code>manager1</code> knowledges and add the function. How can I make this?</p>
  <pre><code>class worker():
      def __init__(self,name,wage,department):
          self.name=name
          self.wage=wage
          self.department=department
      def showtheknowledges(self):
          print(&quot;&quot;&quot;name={}\nwage={}\ndepartment={}&quot;&quot;&quot;.format(self.name,self.wage,self.department))
      def changethedepartment(self,new_department):
          self.department=new_department
  
  class manager(worker):
      pass
  
  manager1=manager(&quot;John Wood&quot;,3000,&quot;IT&quot;)
  
  manager1.showtheknowledges()
  
  manager1.changethedepartment(&quot;marketing&quot;)
  
  manager1.showtheknowledges()
  
  class manager(worker):
      def raise_wage(self,increase):
          self.wage+=increase
  
  #manager2=manager(&quot;John Wood&quot;,3000,&quot;IT&quot;)
  
  #manager2.showtheknowledges()
  </code></pre>
  <p>Note: <code>#manager2</code> parts can be run, I just added <code>#</code> to not use <code>manager2</code>.</p>