é¢æ°ãã©ã¡ã¼ã¿ã¼ property(fget=None, fset=None, fdel=None, doc=None) fgetãããããã£ãåå¾ããã¡ã½ããå fsetãããããã£ãè¨å®ããã¡ã½ããå fdelãããããã£ãåé¤ããã¡ã½ããå docããããããã£ã®èª¬ææ ã¾ã propertyé¢æ°ã使ããªã使ç¨ä¾ã示ãã >>> class Cal(object): ... def __init__(self): ... self.__x = None ... def getx(self): ... return self.__x ... def setx(self, value): ... self.__x = value ... def delx(self): ... del self.__x ... >>> a = Cal() >>> a.setx(10) >>> a.getx
{{#tags}}- {{label}}
{{/tags}}