I need to create an object and define another object's property with that object.
For example, create a class called Income
. Then with an Income
object, define in a class called taxReturn
an attribute called Income
.
That way, it'd be possible to access elements of a business's income by doing the following: taxReturn.Income.sal_wge
. So far I have this:
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'):