28 ms·
So use @property then?
by iterati 9y ago
So use @property then?
- pryelluw 9y ago__SOME_VAR = "foo" @property def some_var(self): return self.__SOME_VAR ?
- TremendousJudge 9y agoYes, just like that. Check out this fantastic talk on being pythonic: https://www.youtube.com/watch?v=wf-BqAjZb8M https://www.youtube.com/watch?v=wf-BqAjZb8M
- harel 9y agoIndeed.