Returns the attribute specified by the fqdn list from obj.
514134
def _obj_getattr(obj, fqdn, start=1):
    
    node = obj
    for chain in fqdn.split('.')[start:]:
        if hasattr(node, chain):
            node = getattr(node, chain)
        else:
            node = None
            break
    return node
36382
def chain_getattr(obj, attr, value=None):
    
    try:
        return _resolve_value(safe_chain_getattr(obj, attr))
    except AttributeError:
        return value
338518
def getattrdeep(obj, attr, *default):
    ''
    attrs = attr.split('.')
    if default:
        getattr_default = lambda o,a,d=default[0]: getattr(o, a, d)
    else:
        getattr_default = lambda o,a: getattr(o, a)

    for a in attrs[:-1]:
        obj = getattr_default(obj, a)

    return getattr_default(obj, attrs[-1])
1332554
def get_attrs(obj):
    """"""
    if not hasattr(obj, '__dict__'):
        return []  # slots only
    proxy_type = types.MappingProxyType if six.PY3 else types.DictProxyType
    if not isinstance(obj.__dict__, (dict, proxy_type)):
        print(type(obj.__dict__), obj)
        raise TypeError("%s.__dict__ is not a dictionary" % obj.__name__)
    return obj.__dict__.keys()
672499
def get_attrs(self):
        """"""
        return FrozenOrderedDict((a, getattr(self.ds, a)) for a in self.ds.ncattrs())
423186
def getname(obj):
    
    for name_attribute in ('__qualname__', '__name__'):
        try:
            # an object always has a class, as per Python data model
            return getattr(obj, name_attribute, getattr(obj.__class__, name_attribute))
        except AttributeError:
            pass
    raise TypeError('object of type %r does not define a canonical name' % type(obj))
341265
function attributes(node) {
    var obj = {};
    each(function(attr) {
      obj[attr.name] = attr.value;
    }, node.attributes);
    return obj;
  }
1226718
public Attribute getObjectClassAttribute(String dn) {
        if (iObjectClassAttrs.length == 1 || dn == null) {
            return iObjectClassAttrs[0];
        } else {

            String[] rdns = LdapHelper.getRDNAttributes(dn);

            for (int i = 0; i < iRDNAttrs.length; i++) {
                String[] attrs = iRDNAttrs[i];
                for (int j = 0; j < attrs.length; j++) {
                    for (int k = 0; k < attrs.length; k++) {
                        if (attrs[j].equals(rdns[k])) {
                            return iObjectClassAttrs[i];
                        }
                    }
                }
            }
        }
        return null;
    }
1338583
def for_entity(obj, check_support_attachments=False):
    """"""
    if check_support_attachments and not supports_attachments(obj):
        return []

    return getattr(obj, ATTRIBUTE)
1361001
def get(self, attr, default=None):
        """"""

        attrs = self.body.get('attributes') or {}
        return attrs.get(attr, default)
1211449
def getitem(self, obj, argument):
        """"""
        try:
            return obj[argument]
        except (TypeError, LookupError):
            if isinstance(argument, basestring):
                try:
                    attr = str(argument)
                except:
                    pass
                else:
                    try:
                        value = getattr(obj, attr)
                    except AttributeError:
                        pass
                    else:
                        if self.is_safe_attribute(obj, argument, value):
                            return value
                        return self.unsafe_undefined(obj, argument)
        return self.undefined(obj=obj, name=argument)
1258200
def getEncodableAttributes(self, obj, **kwargs):
        
        attrs = pyamf.ClassAlias.getEncodableAttributes(self, obj, **kwargs)

        if not self.exclude_sa_key:
            # primary_key_from_instance actually changes obj.__dict__ if
            # primary key properties do not already exist in obj.__dict__
            attrs[self.KEY_ATTR] = self.mapper.primary_key_from_instance(obj)

        if not self.exclude_sa_lazy:
            lazy_attrs = []

            for attr in self.properties:
                if attr not in obj.__dict__:
                    lazy_attrs.append(attr)

            attrs[self.LAZY_ATTR] = lazy_attrs

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

    return null;
}
565591
def getFullName(obj):
    '''
    
    '''
    if hasattr(obj, 'firstName') and hasattr(obj, 'lastName'):
        return ' '.join([obj.firstName or '', obj.lastName or ''])
    return ' '.join([getattr(obj, 'first_name', ''),getattr(obj, 'last_name', '')])
195746
def eval_objfn(self):
        

        dfd = self.obfn_f()
        reg = self.obfn_reg()
        obj = dfd + reg[0]
        return (obj, dfd) + reg[1:]
1370436
def get_required(self, obj):
        """"""
        required = []

        for field_name, field in sorted(obj.fields.items()):
            if field.required:
                required.append(field.name)

        return required or missing
469390
def _iris_obj_to_attrs(obj):
    
    attrs = {'standard_name': obj.standard_name,
             'long_name': obj.long_name}
    if obj.units.calendar:
        attrs['calendar'] = obj.units.calendar
    if obj.units.origin != '1' and not obj.units.is_unknown():
        attrs['units'] = obj.units.origin
    attrs.update(obj.attributes)
    return dict((k, v) for k, v in attrs.items() if v is not None)