I want to create a python library and part of the function of this library involves creating a class instance with some user defined variables. How do I let the user write their own conditionals for the class instance in said instance's method? For example, say I have an instance of the following class:
class Test:
def __init__(self, some_value):
self.some_value = some_value
def func(self):
pass
instance = Test(4)
How do I let a user change what instance.func() does (how can I let a user access the object's variables?