title: How to create class instance inside that class method?
body: <p>I want to create class instance inside itself. I tried to it by this way:</p>
  
  <pre><code>class matrix:
      (...)
      def det(self):
          (...)
          m = self(sz-1, sz-1)
          (...)
      (...)
  </code></pre>
  
  <p>but I got error:</p>
  
  <blockquote>
  <pre><code>m = self(sz-1, sz-1)
  </code></pre>
    
    <p>AttributeError: matrix instance has no <code>__call__</code> method</p>
  </blockquote>
  
  <p>So, I tried to do it by this way:</p>
  
  <pre><code>class matrix:
      (...)
      def det(self):
          (...)
          m = matrix(sz-1, sz-1)
          (...)
      (...)
  </code></pre>
  
  <p>and I got another error:</p>
  
  <blockquote>
  <pre><code>m = matrix(sz-1, sz-1)
  </code></pre>
    
    <p>NameError: global name 'matrix' is not defined</p>
  </blockquote>
  
  <p>Of course matrix is not global class. I have no idea how to solve this problem. </p>