Ad
  • Custom User Avatar

    Your test results expect both the "add" and "take" methods to process a zero amount. In my opinion, a zero amount passed to either of these methods should throw a ValueError.

  • Custom User Avatar
    Safe(balance, pin)
    Safe(pin)  # same as above, but balance = 0
    

    Safe(pin,balance) would seem to be better design if balance is optional.

    If this is only intended to make the kata more difficult, please consider what you're doing there: passing artificially bad design off to your solvers to handle, when completely unnecessary.