property :: Class property
[hide private]
[frames] | no frames]

type property

object --+
         |
        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.")

Instance Methods [hide private]
 
__delete__(descr, obj)
value
__get__(descr, obj, type=...)
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
property attribute

__init__(fget=None, fset=None, fdel=None, doc=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__set__(descr, obj, value)
Properties [hide private]
  fdel
  fget
  fset
Method Details [hide private]

__getattribute__(...)

 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__

__init__(fget=None, fset=None, fdel=None, doc=None)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns:
property attribute

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__