If you want to define classes that are callable that’s of course fine but you need to define the call protocol method:
class MyModelingFunction(object):
…
def __call__(self, *args, **kwargs):
"""do something when I'm called"""
If you want to define classes that are callable that’s of course fine but you need to define the call protocol method:
class MyModelingFunction(object):
…
def __call__(self, *args, **kwargs):
"""do something when I'm called"""