In a MATLAB code, I have a class that is defined with various properties blocks. Following is an example:
properties (GetAccess = public, SetAccess = private)
c = 0.3;
MACHINE_PRECISION = 1e-16;
end
I want to convert the class definition into its python version keeping the same access specifications for the attributes as in MATLAB, i.e. public, private or protected. Now, the one way of doing it is using underscores in front of the names. For example:
__c = 0.3
__MACHINE_PRECISION = 1e-16
Unfortunately, I need to keep the same names since these class definitions are used elsewhere and it's imperative to keep the same names. Is there any way of getting around this roadblock, i.e. specifying the access for the class attributes without having to change their names?