If i try to give a function an optional argument, this way it won't work:
def speed(self, max, now):
self.min = 0
self.max = max
if now != None:
self.now = now
else:
self.now = 0
return self.max, self.now
Can someone help me to understand this and how to do it better? Do i really need the if statement? Maybe there is an easier and faster way with some kind of special argument?