4
class MyClass(object):
def __init__(self):
self._my_secret_thing = 1
def _i_get(self):
return self._my_secret_thing
def _i_set(self, value):
self._my_secret_thing = value
def _i_delete(self):
del self._my_secret_thing
my_thing = property(_i_get, _i_set, _i_delete,'this document for my_thing')
instance_of = MyClass()
help(instance_of.my_thing) # not display the 'this document for my_thing'
help(instance_of) # display the 'this document for my_thing'
問題>爲什麼對於my_thing
幫助信息顯示不出來,如果它是通過help(instance_of.mything)
稱爲所謂的財產文檔功能不顯示幫助信息?爲什麼當它是通過幫助(instance.attribute)