Home | Trees | Index | Help |
---|
Module __builtin__ :: Class property |
|
object
--+
|
property
Property
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.")
Method Summary | |
---|---|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature... | |
descr.__delete__(obj)... | |
descr.__get__(obj[, type]) -> value... | |
x.__getattribute__('name') <==> x.name... | |
descr.__set__(obj, value)... | |
Inherited from object | |
x.__delattr__('name') <==> del x.name... | |
x.__hash__() <==> hash(x)... | |
helper for pickle... | |
helper for pickle... | |
x.__repr__() <==> repr(x)... | |
x.__setattr__('name', value) <==> x.name = value... | |
x.__str__() <==> str(x)... | |
Inherited from type | |
T.__new__(S, ...) -> a new object with type S, a subtype of T... |
Class Variable Summary | |
---|---|
member_descriptor |
fdel = <member 'fdel' of 'property' objects>
|
member_descriptor |
fget = <member 'fget' of 'property' objects>
|
member_descriptor |
fset = <member 'fset' of 'property' objects>
|
Method Details |
---|
__init__(...)
|
__delete__(...)descr.__delete__(obj) |
__get__(descr, obj, type=...)descr.__get__(obj[, type]) -> value
|
__getattribute__(...)x.__getattribute__('name') <==> x.name
|
__set__(...)descr.__set__(obj, value) |
Class Variable Details |
---|
fdel
|
fget
|
fset
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Mon Feb 14 16:49:18 2005 | http://epydoc.sf.net |