I was wondering if there was a more efficient way of doing:
class myClass():
def __init__(self):
self.defaultVal = "default"
def myMeth(self, valToDefault=None):
if valToDefault is None:
valToDefault = self.defaultVal
else:
...
This gets repetitive and I'm sure there is a better method of doing it that I'm just not thinking of.