Re: [Tutor] Problems with pytz module

2017-07-19 Thread Mats Wichmann
> On 19/07/17 20:58, Daniel Bosah wrote: don't see a lot of benefit to using pytz here... just my opinion. the question does give a chance to annotate the example with some thoughts, though; take them for what they're worth. import datetime import pytz class Account: """Simple account class

Re: [Tutor] Problems with pytz module

2017-07-19 Thread Alan Gauld via Tutor
On 19/07/17 20:58, Daniel Bosah wrote: > class Account: > def deposit(self,amount): > if amount > 0: > self.balance += amount > self.show_balance() > > self.transaction_list.append( > def withdrawl(self,amount): > if 0 < amount <= self.balance

Re: [Tutor] Problems with pytz module

2017-07-19 Thread Peter Otten
Daniel Bosah wrote: > I'm learning about OOP programming in Python. > This is my code from my online course. > > import datetime > import pytz > class Account: > """Simple account class with balance""" Why so many "s ? Use either one for single-line strings "Simple account class wit

Re: [Tutor] Problems with pytz module

2017-07-19 Thread Peter Otten
Daniel Bosah wrote: > I'm learning about OOP programming in Python. > This is my code from my online course. > > import datetime > import pytz > class Account: > """Simple account class with balance""" Why so many "s ? Use either one for single-line strings "Simple account class wit

[Tutor] Problems with pytz module

2017-07-19 Thread Daniel Bosah
I'm learning about OOP programming in Python. This is my code from my online course. import datetime import pytz class Account: """Simple account class with balance""" def __init__(self,name,balance): self.name = name self.balance = balance self.transaction_