【发布时间】:2010-10-05 22:19:43
【问题描述】:
confirmation = property(_get_confirmation, _set_confirmation)
confirmation.short_description = "Confirmation"
当我尝试上述方法时,我得到一个我不太明白的异常:
AttributeError: 'property' object has no attribute 'short_description'
这是answer 对此处另一个问题的回答,但我无法对此发表评论,因为我没有足够的积分或其他东西。 :-(
在其他测试中,我在类似情况下也遇到了这个错误:
TypeError: 'property' object has only read-only attributes (assign to .short_description)
有什么想法吗?
【问题讨论】:
标签: python django properties