У меня есть класс и несколько методов в нем
class ThisClass:
def method1(self):
text1 = 'iloveyou'
return text1
def method2(self):
text2 = self.method1
print str(text2)
thisObj = ThisClass()
thisObj.method2
В результате я получаю что-то вроде
<bound method thisclass.method2 of <__main__.thisclass instance at 0x10042eb90>>
как мне печатать 'iloveyou', а не эту вещь?
Спасибо!