Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

week 3 submission #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vietthaotran
Copy link
Contributor

yay finally

else:
return 'False'

def processRequest(self, input):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should split this method from the class and treat it as an independent function/method in another class. This will increase reusability of both the class & the function itself. The FinTech class should know nothing about STDIN/input. It should have only single responsibility of managing clients and talking to Client objects

name = request[1].lower()
amount = float(request[2])
if amount > 0:
if action == 'A':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid magic strings. Use ACTION_ADD_CLIENT = 'A' instead

Copy link
Member

@vietlq vietlq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Only 2 small changes and you are ready to go!

@vietlq
Copy link
Member

vietlq commented Oct 25, 2016

@vietthaotran you have 2 changes to make! 2 steps from perfection!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants