title: Creating objects within an existing object in Python
body: <p>I would like to create an object that holds and creates different objects within itself.
  I have an outer class and inner classes, like this:</p>
  
  <pre><code>class Outer:
      def __init__(self, name):
          self.name = name
  
      def sayHello(self):
          print "Hello " + self.name
  
      class Inner1:
          def __init__(self, name):
              self.name = name
  
      class Inner2(Inner1):
          pass
  
      class Inner3(Inner1):
          pass
  new = outer("new")
  </code></pre>
  
  <p>And then new needs to make on object of inner2 or inner3... 
  I tried it with <code>new.inner2()</code>
  but I don´t get the result I want.
  Any tips?</p>