@@ -20,8 +20,7 @@ def __init__(self, param):
2020 # dictionary that will be used to determine which static method is
2121 # to be executed but that will be also used to store possible param
2222 # value
23- self ._static_method_choices = {'param_value_1' : self ._static_method_1 ,
24- 'param_value_2' : self ._static_method_2 }
23+ self ._static_method_choices = {'param_value_1' : self ._static_method_1 , 'param_value_2' : self ._static_method_2 }
2524
2625 # simple test to validate param value
2726 if param in self ._static_method_choices .keys ():
@@ -68,8 +67,7 @@ def _instance_method_1(self):
6867 def _instance_method_2 (self ):
6968 print ("Value {}" .format (self .x2 ))
7069
71- _instance_method_choices = {'param_value_1' : _instance_method_1 ,
72- 'param_value_2' : _instance_method_2 }
70+ _instance_method_choices = {'param_value_1' : _instance_method_1 , 'param_value_2' : _instance_method_2 }
7371
7472 def main_method (self ):
7573 """will execute either _instance_method_1 or _instance_method_2
@@ -104,8 +102,7 @@ def _class_method_1(cls):
104102 def _class_method_2 (cls ):
105103 print ("Value {}" .format (cls .x2 ))
106104
107- _class_method_choices = {'param_value_1' : _class_method_1 ,
108- 'param_value_2' : _class_method_2 }
105+ _class_method_choices = {'param_value_1' : _class_method_1 , 'param_value_2' : _class_method_2 }
109106
110107 def main_method (self ):
111108 """will execute either _class_method_1 or _class_method_2
@@ -137,8 +134,7 @@ def _static_method_1():
137134 def _static_method_2 ():
138135 print ("executed method 2!" )
139136
140- _static_method_choices = {'param_value_1' : _static_method_1 ,
141- 'param_value_2' : _static_method_2 }
137+ _static_method_choices = {'param_value_1' : _static_method_1 , 'param_value_2' : _static_method_2 }
142138
143139 def main_method (self ):
144140 """will execute either _static_method_1 or _static_method_2
@@ -168,6 +164,7 @@ def main():
168164 test = CatalogStatic ('param_value_1' )
169165 test .main_method ()
170166
167+
171168if __name__ == "__main__" :
172169
173170 main ()
0 commit comments