I am on python 2.7 and trying to call a member function from another function which is located within same class.
class Foo:
def bar(self):
print 'correctly called'
def baz(self):
self.bar
a = Foo()
a.baz()
I went through this question and wrote a sample class as above, but still not able to print "correctly called"
located in function bar
. This may sound little noob but I think this is the only way to call a member function or am I doing anything wrong?
What I want
I simply want to call print statement located in bar
function from another member function baz
within same class.