title: Correct way to write __repr__ function with inheritance
body: <p>I'm experimenting with OOP python and I wasn't sure about the <code>__repr__</code> function inheritance. Since the parent class function looked like this:</p>
  
  <pre><code>def __repr__(self):
      '''Returns representation of the object'''
      return("{}({!r})".format("Class name", self._param))
  </code></pre>
  
  <p>I wanted to know if it is better to use a generic approach (which could be suitable for children classes as well) like the following one:</p>
  
  <pre><code>def __repr__(self):
      '''Returns representation of the object'''
      return("{}({!r})".format(self.__class__.__name__, self._param))
  </code></pre>
  
  <p>or if it is a good practice to override the function in every class.</p>
  
  <p>Also, please ignore the encoding part, since I'm leaving it behind.</p>