課程
/后端開發
/Python
/python進階
property和score.setter是內置的裝飾函數?可以直接用?
2015-03-26
源自:python進階 6-7
正在回答
參考https://docs.python.org/3/library/functions.html?highlight=property#property
@property是內置的,@score.setter 是使用@property之后才有的,也就是副作用,我這樣理解對不對
舉報
學習函數式、模塊和面向對象編程,掌握Python高級程序設計
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2015-04-03
參考https://docs.python.org/3/library/functions.html?highlight=property#property
2015-03-27
@property是內置的,@score.setter 是使用@property之后才有的,也就是副作用,我這樣理解對不對