Jun-05-2023, 11:06 PM
I'm trying to learn how to use Python classes using this one as an example:
I keep getting this error message for this functions:
1 2 3 4 5 6 7 8 9 10 11 |
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 = value |
1 2 3 4 |
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 |