Get a named attribute of this instance, or return the default.
340210
def get(self, name: str, default: Optional[Any]=None) -> Any:
        """"""
        return self.__dict__.get(name, default)
729512
def get_attr(obj, attr, default=None):
    
    if '.' not in attr:
        return getattr(obj, attr, default)
    else:
        L = attr.split('.')
        return get_attr(getattr(obj, L[0], default), '.'.join(L[1:]), default)
1011261
def get(self, name: str, default: Any = None) -> np.ndarray:
		
		if name in self:
			return self[name]
		else:
			return default
624089
def get_attribute(self, attribute_name, mapped_class=None, key=None):
        
        attr_map = self.__get_attribute_map(mapped_class, key, 0)
        try:
            return attr_map[attribute_name]
        except KeyError:
            raise AttributeError(attribute_name)
131916
def get_attribute(self, name):
        
        def get_attribute_element():
            """
            Wrapper to retrieve element
            """
            return self.element.get_attribute(name)
        return self.execute_and_handle_webelement_exceptions(get_attribute_element, 'get attribute "' + str(name) + '"')
1056628
def _general_getattr(self, var):
        """"""
        if getattr(self, "_%s__%s" % (self.__class__.__name__, var)) is None \
           and not self.__loaded:
            self._load_properties()
        return getattr(self, "_%s__%s" % (self.__class__.__name__, var))
828296
def get_mandatory_attribute(name)
      key = name.to_s
      raise ::ArgumentError, "unknown attribute, name=#{key}" unless self.include? key
      self[key]
    end
569944
def get_attribute(module_name: str, attribute_name: str):
    
    assert isinstance(module_name, str)
    assert isinstance(attribute_name, str)

    _module = importlib.import_module(module_name)
    return getattr(_module, attribute_name)
374466
public Object getAttribute(final String name) {
        assertActive();
        if (attributes.containsKey(name)) {
            return attributes.get(name);
        }
        Object value = originalSession.getAttribute(name);
        if (value instanceof SerializedObjectHolder) {
            value = ((SerializedObjectHolder) value).getDeserializedObject();
            if (value != null) {
                attributes.put(name, value);
            } else {
                originalSession.removeAttribute(name);
            }
        }
        return value;
    }
304867
def getattr(self, name, context=None):
        
        if name in self.instance_attrs:
            return self.instance_attrs[name]
        if name in self.special_attributes:
            return [self.special_attributes.lookup(name)]
        raise exceptions.AttributeInferenceError(target=self, attribute=name)
364547
def instantiate_by_name_with_default(self, object_name, default_value=None):
        
        if object_name not in self.instances:
            if object_name not in self.environment:
                return default_value
            else:
                instance = self.instantiate_from_data(self.environment[object_name])

                self.instances[object_name] = instance
                return instance
        else:
            return self.instances[object_name]
1261573
def cls_get_by_name(cls, name):
    
    try:
        val = getattr(cls, name)
    except AttributeError:
        for attr in (a for a in dir(cls) if not a.startswith('_')):
            try:
                val = getattr(cls, attr)
            except AttributeError:
                # Is known to happen.
                continue
            valname = getattr(val, 'name', None)
            if valname == name:
                return val
        else:
            raise ValueError('No {} with that name: {}'.format(
                cls.__name__,
                name,
            ))
    else:
        return val
929141
def get(self, name):
        
        # read the attribute
        attr = getattr(self.context, name, None)
        if callable(attr):
            return attr()
        return attr
253199
def get_attribute(self, name):
        
        assert isinstance(name, basestring)
        value = None
        if self.__attributes and name in self.__attributes.keys():
            value = self.__attributes[name]
        return value
946171
public Object getAttribute(String name)
    throws IOException
  {
    if (_stream != null)
      return _stream.getAttribute(name);
    else
      return null;
  }
488864
public function getAttribute($name, $default = null)
    {
        $value = $default;
        if ($this->hasAttribute($name)) {
            $value = $this->attributes->get($name);
        }
        return $value;
    }
268634
def _getattr(self, val, key, default_val):
        """"""
        try:
            ret = getattr(val, key, default_val)

        except Exception as e:
            logger.exception(e)
            ret = default_val

        return ret