I'm trying to get my function to work: def deposit(self,amount): if amount > 0: self.balance += amount self.show_balance() self.transaction_list.append((pytz.utc.localize(datetime.datetime.utcnow()),amount)) # appends traction details to list
def show_transactions(self): for date, amount in self.transaction_list: if amount > 0: tran_type = "deposited" else: tran_type = "withdrawn" amount *= -1 # to show negative number print "{:6} {} on {} (local time was {})".format(amount, tran_type, date, date.astimezone()) But it doens't show on the console at all. Theres no error message, show_transactions just doesn't show up in the console, which is weird. I think it may be the way I installed my package, but last time I checked, it's installed in the right place. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor