So here is my situation. I have a class ABCAdapter. Here I have declared a bunch of methods and between them I have:
@staticmethod
def __prepare_param_names(attributes_list, prefix = None):
....some processing....
Now from another class, namely FlowService I do:
from tvb.core.adapters.abcadapter import ABCAdapter
...other imports and code...
def prepare_adapter(self, project_id, adapter_module, adapter_name):
...some more code here...
interface = adapter_instance.get_attribute_list()
interface = ABCAdapter.__prepare_param_names(interface)
...some more code here...
Now this fails at the call to the static method with:
AttributeError: type object 'ABCAdapter' has no attribute '_FlowService__prepare_param_names'
Now I’ve not used static methods so far so what is the trick here?
Regards,
Bogdan
It looks like the
__(double_) prefix is reserved; changing it to a single_should do the trick.