Python 描述符

Python中訪問一個屬性的優先級函數

一、類屬性code

二、數據描述符get

三、實例屬性方法

四、非數據描述符(非覆蓋型描述符)數據

五、找不到==> getattrco

 

 

數據描述符:實現__get__和__set__方法參數

非數據描述符:只實現__get__方法實例

 

property內建函數有四個參數:property(fget=None, fset=None, fdel=None, doc=None)

相關文章
相關標籤/搜索