Internal method.  Used by __getattr__() and __getitem__().
350626
def _getattr_ (self, name):
        """"""
        value = self._config.get(name)

        if type(value) is dict:
            value = AitConfig(self._filename, config=value)

        return value
805880
function GetAttr(obj, attr) {
    if(!!obj) {
        if(typeof obj.attr == 'undefined' && typeof obj.getAttr == 'function') {
            return obj.getAttr(attr);
        }
    }

    return null;
}
865027
def _param(self):
        
        class Parameters(object):
            def __getitem__(_self, name):
                return self.getParameter(name)

            def __setitem__(_self, name, value):
                if isinstance(value, (float, int, basestring)):
                    self.getParameter(name).set(value)
                else:
                    self.getParameter(name).setValues(value)

            def __iter__(_self):
                return self.getParameters()

        return Parameters()
341404
def int(self, item, default=None):
        
        try:
            item = self.__getattr__(item)
        except AttributeError as err:
            if default is not None:
                return default
            raise err
        return int(item)
151563
def view_getattr():
    

    def view_getattr(_value, context, **_params):
        value = getattr(context["view"], context["key"])
        return _attr(value)

    return view_getattr
1310276
def Get(self, attribute, default=None):
    """"""
    if attribute is None:
      return default

    # Allow the user to specify the attribute by name.
    elif isinstance(attribute, str):
      attribute = Attribute.GetAttributeByName(attribute)

    # We can't read attributes from the data_store unless read mode was
    # specified. It is ok to read new attributes though.
    if "r" not in self.mode and (attribute not in self.new_attributes and
                                 attribute not in self.synced_attributes):
      raise IOError("Fetching %s from object not opened for reading." %
                    attribute)

    for result in self.GetValuesForAttribute(attribute, only_one=True):
      try:
        # The attribute may be a naked string or int - i.e. not an RDFValue at
        # all.
        result.attribute_instance = attribute
      except AttributeError:
        pass

      return result

    return attribute.GetDefault(self, default)
1123936
def get_value(self, key, args, kwargs):
        """"""
        if hasattr(self._item, key):
            return getattr(self._item, key)
        return super().get_value(key, args, kwargs)
464826
def get_attribute(instance, attrs):
    
    for attr in attrs:
        if instance is None:
            # Break out early if we get `None` at any point in a nested lookup.
            return None
        try:
            if isinstance(instance, collections.Mapping):
                instance = instance[attr]
            else:
                instance = getattr(instance, attr)
        except ObjectDoesNotExist:
            return None
        if is_simple_callable(instance):
            try:
                instance = instance()
            except (AttributeError, KeyError) as exc:
                # If we raised an Attribute or KeyError here it'd get treated
                # as an omitted field in `Field.get_attribute()`. Instead we
                # raise a ValueError to ensure the exception is not masked.
                raise ValueError('Exception raised in callable attribute "{0}"; original exception was: {1}'.format(attr, exc))

    return instance
30898
def value_attr(attr_name):
    

    def value_attr(value, context, **_params):
        value = getattr(value, attr_name)
        return _attr(value)

    return value_attr
135203
def get_callable_attr(self, attr_name):
        

        if not hasattr(self.doubled_obj, attr_name):
            return None

        func = getattr(self.doubled_obj, attr_name)
        if not is_callable(func):
            return None

        attr = Attribute(
            func,
            'attribute',
            self.doubled_obj if self.is_class_or_module() else self.doubled_obj_type,
        )
        self.attrs[attr_name] = attr
        return attr
882456
def attr(cls, iterable, attr_name):
    

    return cls(getattr(x, attr_name) for x in iterable)
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)
1040452
def _get_item(list_containing_dicts_entries, attribute_value,
                  attribute_name='subnet_id'):
        
        for item in list_containing_dicts_entries:
            if item.get(attribute_name) == attribute_value:
                return item
        return {}
1053699
def getattr_in_cls_list(cls_list, attr, default):
    
    for cls in cls_list:
        if hasattr(cls, attr):
            return getattr(cls, attr)
    return default
1267673
def getCurrentItem(self): # TODO: rename? getCurrentItemAndIndex? getCurrentTuple? getCurrent?
        
        currentIndex = self.getRowCurrentIndex()
        currentItem = self.model().getItem(currentIndex)
        return currentItem, currentIndex
368234
def get(self, key, default=miss):
        """"""
        if key not in self._dict:
            return default

        # invokes __getitem__, which updates the item
        return self[key]
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))