原创 【python基礎】十二、python 面向對象 私有化

私有化 封裝 私有化屬性 定義公有的set、get 優點 進行set爲私有變量賦值時,可以判斷是否合法 普通私有化 # 私有化 class Person(object): # __age = 18