Case1:
def ABS(ogh):
print "XYZ is good"
ABS('jk')
Works fine.
Case2:
class A(object):
def ABS(ogh):
print "XYZ is good"
a=A()
a.ABS('jk')
TypeError: ABS() takes exactly 1 argument 2 given)
Case3:-
class A(object):
def ABS(ogh):
print "XYZ is good"
a=A()
a.ABS()
This one works fine.
My doubt is why do I get error in Case2 and why there is no requirement of a variable while calling the function/method(here, since under class) ABS defined inside the class A?
selfargument.