Please see my code snips below. get_simple_percentiles
and get_simple_percentile
are able to access simple_lut.__simple_lut_dict
. However, get_another_percentile
cannot access simple_lut.__another_lut
. The name of the file is simple_lut.py
.
class simple_lut(object):
__simple_lut_fname = None # filename for the LUT (Look Up Table)
__simple_lut_dict = {} # Dictionary of LUTs, one for each task
__another_lut_fname = None
__another_lut = None
def __init__(self, simple_lut_filename, another_lut_filename=None ):
# load simple LUT
# ...
for idx, curr_task in enumerate( tasks ):
# ...
self.__simple_lut_dict[ curr_task ] = tmp_dict
# load another LUT
# ...
self.__another_lut = tmp_dict
def get_simple_percentiles(self, subject):
# for each simple task, go from score to percentile
# calls get_simple_percentile
@staticmethod
def get_simple_percentile(subject, task):
# works fine here
tmp_dict = simple_lut.__simple_lut_dict[task]
@staticmethod
def get_another_percentile(subject):
# this always comes back as None!!1
tmp_dict = simple_lut.__another_lut