def get_setter(cls, prop_name,   # @NoSelf
                   user_setter=None, setter_takes_name=False,
                   user_getter=None, getter_takes_name=False):
        """Similar to get_getter, but for setting property
        values. If user_getter is specified, that it may be used to
        get the old value of the property before setting it (this
        is the case in some derived classes' implementation). if
        getter_takes_name is True and user_getter is not None, than
        the property name is passed to the given getter to retrieve
        the property value."""

        if user_setter:
            if setter_takes_name:
                # wraps the property name
                def _setter(self, val):
                    return user_setter(self, prop_name, val)
            else: _setter = user_setter
            return _setter

        def _setter(self, val):  # @DuplicatedSignature
            setattr(self, PROP_NAME % {'prop_name' : prop_name}, val)
            return
        return _setter
def get_setter ( cls , prop_name , user_setter = None , setter_takes_name = False , user_getter = None , getter_takes_name = False ) : if user_setter : if setter_takes_name : def _setter ( self , val ) : return user_setter ( self , prop_name , val ) else : _setter = user_setter return _setter def _setter ( self , val ) : setattr ( self , PROP_NAME % { 'prop_name' : prop_name } , val ) return return _setter
Similar to get_getter, but for setting property
        values. If user_getter is specified, that it may be used to
        get the old value of the property before setting it (this
        is the case in some derived classes' implementation). if
        getter_takes_name is True and user_getter is not None, than
        the property name is passed to the given getter to retrieve
        the property value.