Module __builtin__ :: Class property
[show private | hide private]
[frames | no frames]

Class property

object --+
         |
        property

Known Subclasses:
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
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature...
  __delete__(...)
descr.__delete__(obj)...
  __get__(descr, obj, type)
descr.__get__(obj[, type]) -> value...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __set__(...)
descr.__set__(obj, value)...
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...
    Inherited from type
  __new__(T, S, ...)
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__(...)
(Constructor)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
__builtin__.object.__init__

__delete__(...)

descr.__delete__(obj)

__get__(descr, obj, type=...)

descr.__get__(obj[, type]) -> value
Returns:
value

__getattribute__(...)

x.__getattribute__('name') <==> x.name
Overrides:
__builtin__.object.__getattribute__

__set__(...)

descr.__set__(obj, value)

Class Variable Details

fdel

Type:
member_descriptor
Value:
<member 'fdel' of 'property' objects>                                  

fget

Type:
member_descriptor
Value:
<member 'fget' of 'property' objects>                                  

fset

Type:
member_descriptor
Value:
<member 'fset' of 'property' objects>                                  

Generated by Epydoc 2.0 on Mon Feb 14 16:49:18 2005 http://epydoc.sf.net