Apr-27-2017, 11:26 AM
(Apr-27-2017, 07:26 AM)buran Wrote: Note that you should not supply mutable default arguments, e.g.
def parseVote(s=[]):THAT'S NOT THE RIGHT WAY
Actually, in some very specific cases this is the right way - if you build a caching mechanism. Though in those cases I would use underscored name.
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.