【发布时间】:2014-12-17 19:37:46
【问题描述】:
class Foo:
def __init__(self):
pass
@property
def get_features(self):
return (1,2,3,)
def execute(self):
print self.get_features()
f = Foo()
f.execute()
我明白了:
TypeError: 'tuple' object is not callable
我感兴趣的实际上是那个元组的长度。
【问题讨论】:
标签: python class properties