| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,29 +21,29 @@ def __init__(self, param): | |||
| 21 | 21 | # dictionary that will be used to determine which static method is | |
| 22 | 22 | # to be executed but that will be also used to store possible param | |
| 23 | 23 | # value | |
| 24 | - self.static_method_choices = {'param_value_1': self.static_method_1, | ||
| 25 | - 'param_value_2': self.static_method_2} | ||
| 24 | + self._static_method_choices = {'param_value_1': self._static_method_1, | ||
| 25 | + 'param_value_2': self._static_method_2} | ||
| 26 | 26 | ||
| 27 | 27 | # simple test to validate param value | |
| 28 | - if param in self.static_method_choices.keys(): | ||
| 28 | + if param in self._static_method_choices.keys(): | ||
| 29 | 29 | self.param = param | |
| 30 | 30 | else: | |
| 31 | 31 | raise Exception("Invalid Value for Param: {0}".format(param)) | |
| 32 | 32 | ||
| 33 | 33 | @staticmethod | |
| 34 | - def static_method_1(): | ||
| 34 | + def _static_method_1(): | ||
| 35 | 35 | print("executed method 1!") | |
| 36 | 36 | ||
| 37 | 37 | @staticmethod | |
| 38 | - def static_method_2(): | ||
| 38 | + def _static_method_2(): | ||
| 39 | 39 | print("executed method 2!") | |
| 40 | 40 | ||
| 41 | 41 | def main_method(self): | |
| 42 | 42 | """ | |
| 43 | - will execute either static_method_1 or static_method_2 | ||
| 43 | + will execute either _static_method_1 or _static_method_2 | ||
| 44 | 44 | depending on self.param value | |
| 45 | 45 | """ | |
| 46 | - self.static_method_choices[self.param]() | ||
| 46 | + self._static_method_choices[self.param]() | ||
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | 49 | def main(): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments