Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a great idea, but it needs some polish. A native speaker needs to proofread the English, and the problems are underspecified


Also some weird coding choices...

The first problem has a function 'prototyped' as:

  def checkio(data):
    balance, withdrawal = data
Where 'data' is a list, the first element being the initial balance, the second element being a list of withdrawals (plural... despite the fact that it's called 'withdrawal' when it's unpacked).

Why bother with the list unpacking?

Why not just define the function as:

  def checkio(balance, widthdrawals):
    pass
EDIT: Giving it some thought, I assume future problems will use the same 'checkio' function, so it has to have the same argument list...

Using kwargs might be more Pythonic, if that's a design constraint...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: