title: Creating Sub-Objects in Python
body: <p>I need to create an object and define another object's property with that object.</p>
  
  <p>For example, create a class called <code>Income</code>. Then with an <code>Income</code> object,  define in a class called <code>taxReturn</code> an attribute called <code>Income</code>.</p>
  
  <p>That way, it'd be possible to access elements of a business's income by doing the following: <code>taxReturn.Income.sal_wge</code>. So far I have this:</p>
  
  <pre><code>class taxReturn:
  
      def __init__(self, income = None):
  
          income = income or ['sal_wge', 'intr_rec', 'txexem_intinc', 'divid_AGI', 'qual_divid', 'stinc_txref', 'alimony_rec', 
                   'bus_netprof', 'net_capgain', 'capgain_dist', 'othr_gain', 'IRA_dist', 'pens_annu_rec', 'pens_annu_AGI', 
                   'sch_E_netinc', 'sch_F_netprof', 'unem_comp', 'soc_sec']
  
          self.income = 'income'
  
  class Income:
     def ('income'):
  </code></pre>