title: Python: asking if two objects are the same class
body: <p>I have a class Animal and other animals inherit from it (e.q. Sheep, Wolf).<br>I want to check if two objects are the same class and if so, it should create new object of the same class and if they are not, they are fighting.</p>
  
  <pre><code>if x and y same object:
      #create new object
  else:
      #fight
  </code></pre>
  
  <p>Is there a better method than <code>isinstance</code>?<br>
  Because, there will be more animals than just 2 and I think it wouldn't be efficient to do it like this:</p>
  
  <pre><code>if isinstance(x, Wolf)
      # ...
  </code></pre>