Using "public" vars or attributes in class calls, functional approach
- by marw
I was always wondering about two things I tend to do in my little projects. Sometimes I will have this design:
class FooClass
...
self.foo = "it's a bar"
self._do_some_stuff(self)
def _do_some_stuff(self):
print(self.foo)
And sometimes this one:
class FooClass2
...
self.do_some_stuff(foo="it's a bar")
def…