I'm quite new to Python oop. So, this class:
class Foo:
def barfunc(self, baz):
print baz
looks to me quite similar to
class Foo:
def barfunc(self, baz):
self.baz = baz
print self.baz
Output will, I think be the same, so I would like to know which is preferred and why. Maybe I miss major possible pitfalls from using one or another.
(), unless you're inheriting from something.. i.e.class Foo(object):. function declaration should end with:...). Further, class name should begin with capital case.