title: Python child instance property appears to be overridden by parent property
body: <p>I'm in the process of learning Python 3 and writing conceptual bits of code to aid my understanding. I hit a problem with a simple class inheritance example where an instance variable from the child class appears to be overridden by the parent variable.</p>
  
  <p>I've played around with the following code in various forms and have simplified it for the purpose of this question. I can't figure out why the Child object's own <code>__str__()</code> method is referring to the <code>name</code> property of the Parent when I am using <code>self.name</code> inside the Child class to refer to the <code>name</code> property of the Child (it's as if <code>self.name</code> is replaced with <code>super().name</code>).</p>
  
  <pre class="lang-py prettyprint-override"><code>class Parent():
  
      """ Parent class that will take a name or default to 'Default Parent'.
      """
  
      def __init__(self, name="Default Parent"):
          self.name = name
  
      def __str__(self):
          return f'Parent: I am {self.name}'
  
  class Child(Parent):
  
      """ Child class inheriting from Parent class
      """
  
      def __init__(self, name="Default Child"):
          # setting self.name to the name passed in during Child instantiation
          self.name = name
          # not passing self.name so parents's self.name will be defaulted to "Default Parent"
          super().__init__() 
  
      def __str__(self):
          # self.name prints "Default Parent"
          # The property self.name in Child appears to be overridden.
          # Thought self.name here refers to the instant variable belonging to the instance of Child and not super().name.
          return f'Child: I am {self.name}'
  
  </code></pre>
  
  <p>I've tested this as follows:</p>
  
  <pre><code>p1 = Parent("Parent 1")
  c1 = Child("Child 1")
  print(p1)
  print(c1)
  </code></pre>
  
  <p>I expected these results back:</p>
  
  <pre><code>Parent: I am Parent 1
  Child: I am Child 1
  </code></pre>
  
  <p>Instead, I got these back:</p>
  
  <pre><code>Parent: I am Parent 1
  Child: I am Default Parent
  </code></pre>