class my_class
def is_same(self, arg1, arg2):
return arg1 == arg2
def a_function(self):
if is_same('a', 'b'):
print "They're the same"
Eclipse tells me is_same is an undefined variable. I think you can do this in Java.
I needed to say
self.is_same()because these functions were inside a class. Coming from Java where you don’t need to saythis.method(), I was confused.