title: Un-Wrap or De-Inherit an object
body: <p>A code block I do not have access to, returns an object that is &quot;wrapped&quot; or rather inherited from a base class, that I want to recover. The wrapper is harmful, I want to get rid of it. Is there a way to upcast to the parent class? To unwrap the object? To disinherit it?</p>
  <p>I prepared a simple example: Is it possible to manipulate the <code>u</code> object in a way that it will be a <code>Person</code> object and say hello in  a nice way?</p>
  <pre><code>class Person():
      def __init__(self, name):
          self.name = name
  
      def say_hello(self):
          print(&quot;Hi, my name is &quot; + self.name)
  
  class Unfriendly_Person(Person):
      def say_hello(self):
          print(&quot;Leave me alone!&quot;)
  
  u = Unfriendly_Person(&quot;TJ&quot;)
  u.say_hello()
  </code></pre>