title: How does __call__ actually work?
body: <p>Python's magic method <code>__call__</code> is called whenever you attempt to call an object. <code>Cls()()</code> is thus equal to <code>Cls.__call__(Cls())</code>.</p>
  
  <p>Functions are first class objects in Python, meaning they're just callable objects (using <code>__call__</code>). However, <code>__call__</code> itself is a function, thus it too has <code>__call__</code>, which again has its own <code>__call__</code>, which again has its own <code>__call__</code>.</p>
  
  <p>So <code>Cls.__call__(Cls())</code> is thus equal to <code>Cls.__call__.__call__(Cls())</code> and again equilevant to <code>Cls.__call__.__call__.__call__(Cls())</code> and so on and so forth.</p>
  
  <p>How does this infinite loop end? How does <code>__call__</code> actually execute the code?</p>