<s> class TaxNotKnown ( Exception ) : <EOL> """<STR_LIT>""" <EOL> class Price ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , currency , excl_tax , incl_tax = None , tax = None ) : <EOL> self . currency = currency <EOL> self . excl_tax = excl_tax <EOL> if incl_tax is not None : <EOL> self . incl_tax = incl_tax <EOL> self . is_tax_known = True <EOL> elif tax is not None : <EOL> self . incl_tax = excl_tax + tax <EOL> self . is_tax_known = True <EOL> else : <EOL> self . incl_tax = None <EOL> self . is_tax_known = False <EOL> def _get_tax ( self ) : <EOL> return self . incl_tax - self . excl_tax <EOL> def _set_tax ( self , value ) : <EOL> self . incl_tax = self . excl_tax + value <EOL> self . is_tax_known = True <EOL> tax = property ( _get_tax , _set_tax ) <EOL> def __repr__ ( self ) : <EOL> if self . is_tax_known : <EOL> return "<STR_LIT>" % ( <EOL> self . __class__ . __name__ , self . currency , self . excl_tax , <EOL> self . incl_tax , self . tax ) <EOL> return "<STR_LIT>" % ( <EOL> self . __class__ . __name__ , self . currency , self . excl_tax ) <EOL> def __eq__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> return ( self . currency == other . currency and <EOL> self . excl_tax == other . excl_tax and <EOL> self . incl_tax == other . incl_tax ) </s>
