Jun-05-2023, 11:06 PM
I'm trying to learn how to use Python classes using this one as an example:
class ExampleClass: ... def __init__(self,example_parameter): ... self.example_data=33 ... self.example_param=example_parameter ... print("message from the constructor") ... def example_method(self): ... print(self.example_param) ... def get_example_data(self): ... return self.example_data ... def set_example_data(self): ... self.example_data=valueI keep getting this error message for this functions:
example_class_object.set_example_data(543) Traceback (most recent call last): File "<blender_console>", line 1, in <module> TypeError: ExampleClass.set_example_data() takes 1 positional argument but 2 were given