クラスのインスタンスを出力するときに文字列値を返そうとします。それは私が望むようには機能しないようです。
class oObject (object):
def __init__(self, value):
self.value = value
def __str__(self):
return str(self.value)
def __repr__(self):
return str(self.value)
new = oObject(50)
# if I use print it's Okay
print new
# But if i try to do something like that ...
print new + '.kine'