def set_commission(self, commission): if not isinstance(commission, (PerShare, PerTrade, PerDollar)): raise UnsupportedCommissionModel() if self.initialized: raise OverrideCommissionPostInit() self.commission = commission
def set_commission(self, commission): if self.initialized: raise OverrideCommissionPostInit() self.commission = commission