Home | Trees | Indices | Help |
|
---|
|
property(fget=None, fset=None, fdel=None, doc=None) -> property attribute fget is a function to be used for getting an attribute value, and likewise fset is a function for setting, and fdel a function for del'ing, an attribute. Typical use is to define a managed attribute x: class C(object): def getx(self): return self._x def setx(self, value): self._x = value def delx(self): del self._x x = property(getx, setx, delx, "I'm the 'x' property.") Decorators make defining new properties or modifying existing ones easy: class C(object): @property def x(self): return self._x @x.setter def x(self, value): self._x = value @x.deleter def x(self): del self._x
|
|||
|
|||
value |
|
||
|
|||
property attribute |
|
||
a new object with type S, a subtype of T |
|
||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
fdel | |||
fget | |||
fset | |||
Inherited from |
|
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 23 23:09:41 2012 | http://epydoc.sourceforge.net |