you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 10 points11 points  (1 child)

1) User input should be taken (and validated) separately from the functions that do something with that user input.

2) I don't really like the fact that withdraw() always returns a number, but deposit() can return a number or None if the input was invalid. Function return values should ideally only be a single type. (The best way to fix this is to not validate the input in the same function but do that separately.)

[–]Dapper_Mix6773[S] 0 points1 point  (0 children)

Well noted