'get zmq options by attribute'

def __getattr__(self, key):

    upper_key = key.upper()
    try:
        opt = getattr(constants, upper_key)
    except AttributeError:
        raise AttributeError(('%s    has    no    such    option:    %s' % (self.__class__.__name__, upper_key)))
    else:
        return self._get_attr_opt(upper_key, opt)
