Reputation: 4421
class A:
def a(self):
print 'a'
def b(self):
print 'b'
a()
Upvotes: 1
Views: 347
Reputation: 880937
Class methods need their first argument to be self
. You can then call the a
method with self.a()
:
class A:
def a(self):
print 'a'
def b(self):
print 'b'
self.a()
Upvotes: 7