'Intercept attribute setting on HasProps in order to special case
a few situations:
* short circuit all property machinery for ``_private`` attributes
* handle setting ``__deprecated_attributes__``
* suggest similar attribute names on attribute errors
Args:
name (str) : the name of the attribute to set on this object
value (obj) : the value to set
Returns:
None'

def __setattr__(self, name, value):

    if name.startswith('_'):
        super(HasProps, self).__setattr__(name, value)
        return
    props = sorted(self.properties())
    deprecated = getattr(self, '__deprecated_attributes__', [])
    if ((name in props) or (name in deprecated)):
        super(HasProps, self).__setattr__(name, value)
    else:
        (matches, text) = (difflib.get_close_matches(name.lower(), props), 'similar')
        if (not matches):
            (matches, text) = (props, 'possible')
        raise AttributeError(("unexpected    attribute    '%s'    to    %s,    %s    attributes    are    %s" % (name, self.__class__.__name__, text, nice_join(matches))))
