title: How do you call an instance of a class in Python?
body: <p>This is inspired by a question I just saw, "Change what is returned by calling class instance", but was quickly answered with <code>__repr__</code> (and accepted, so the questioner did not actually intend to call the instance).</p>
  
  <p>Now calling an instance of a class can be done like this:</p>
  
  <pre><code>instance_of_object = object() 
  instance_of_object()
  </code></pre>
  
  <p>but we'll get an error, something like <code>TypeError: 'object' object is not callable</code>.</p>
  
  <p>This behavior is defined in the CPython <a href="https://github.com/python/cpython/blob/master/Objects/call.c#L80" rel="noreferrer">source here.</a></p>
  
  <p>So to ensure we have this question on Stackoverflow:</p>
  
  <blockquote>
    <p>How do you actually call an instance of a class in Python?</p>
  </blockquote>