title: Python3 and recursive class
body: <p>I want to define own tree-like class. I've written code like this:</p>
  
  <pre><code>class forest:
          class tree:
                  def __init__(self):
                          self.var_a = []
                          self.var_b = []
                          #Or something as simple
                  def mk(self,something):
                          #Some instructions
                          self.a = tree()
                          b_var = self.a.mk(a_var)
                          self.b = tree()
                          c_var = self.a.mk(b_var)
                          #Some instructions
                          return ret
          #Some code for class forest
  </code></pre>
  
  <p>Well <code>tree()</code> doesn't work.</p>
  
  <pre><code>NameError: global name 'tree' is not defined
  </code></pre>
  
  <p>The error for <code>self.tree()</code>:</p>
  
  <pre><code>AttributeError: 'tree' object has no attribute 'tree'
  </code></pre>
  
  <p>I do not know how (or if) to use <code>self.__init__</code> or <code>self.__new__</code> in this context.</p>
  
  <p><strong>The question</strong><br>
  It is possible to use recursive class in Python3? How does the code for this look like?</p>