title: How to recall an attribute from a method (of parent class)?
body: <p>according to codes here, I am trying to recall an attribute (branch_name) from parent class (Elec_eng) inside child class (telecoms_check method):</p>
  
  <pre><code>class Elec_eng:
     def __init__(self):
         print("This is Electrical Engineering main class")
     def sub_branch(self, branch_num):
         self.branch_name = branch_num
  
  class Telecoms(Elec_eng):
     def telecoms_check(self):
         if self.branch_name == 1 :
              print("True")
         else:
              print("False")
  
  E = Elec_eng()
  T = Telecoms()
  E.sub_branch(1)
  </code></pre>
  
  <p>Now, when I want to check telecoms_check method ( >> <code>T.telecoms_check()</code>  ), I expect "True" output but I got this:</p>
  
  <pre><code>'Telecoms' object has no attribute 'branch_name'
  </code></pre>
  
  <p>What is the problem? and How I could solve it? (with <code>super()</code> method? how?)</p>