📜  最终类变量 python 代码示例

📅  最后修改于: 2022-03-11 14:45:08.716000             🧑  作者: Mango

代码示例1
# you can access this using properties(getter, setter) and 
# define only the getter

class a:
  def __init__(self, name):
    self.__name = name
  
  @property
  def name(self):
    return self.__name