May-22-2018, 10:25 AM
(May-22-2018, 09:41 AM)Rajesh1978 Wrote: take all the default arguments to the end of the function declaration likeThose are called
def __init__(self, name, hp, mana, atkdmg, chardef baselevel=1,basedmg=0, basedef=0):And call accordingly
keyword
arguments - not default
arguments; they have default values
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.