def __init__(self, name, default = __NONE, mode = Mode.READ_WRITE, doc = None):
        """Construct a new Property data descriptor.

        \var{name} the name of the attribute being created.
        \var{default} the (optional) default value to use when
        retrieving the attribute if it hasn't already been set.
        \var{mode} the mode of the constructed Property.
        \var{doc} the documentation string to use.  This string is
        accessed through the declaring class.
        """
        self.__name = name
        self.__key = '__property__' + name
        if mode.__class__ not in (i.__class__ for i in self.Mode):
            raise TypeError, "the mode parameter requires a member of the 'Property.Mode' enumeration but received a '%s'" % mode.__class__.__name__
        self.__mode = mode
        if default is not self.__NONE:
            self.__default = default
        elif mode is self.Mode.READ_ONLY:
            raise ValueError, 'read only attributes require a default value'
        if doc is None:
            self.__doc__ = 'the "%s" property' % name
        else:
            self.__doc__ = doc
Construct a new Property data descriptor.

        ar{name} the name of the attribute being created.
        ar{default} the (optional) default value to use when
        retrieving the attribute if it hasn't already been set.
        ar{mode} the mode of the constructed Property.
        ar{doc} the documentation string to use.  This string is
        accessed through the declaring class.
        
recipes/Python/577482_Easy_property/recipe-577482.py