I would like to know what is the cleanest way to attain this in python:
class A():
def __init__(self, def_val):
self.def_val=def_val
def ciao(self, parameter=self.def_val):
print(parameter)
Of course the above gives me: "NameError: name 'self' is not defined"