Get an instance of a ``Features`` class by ``name`` (str).
540289
def get_feature(name):
    """"""
    if name == 'css':
        return CSSFeatures()
    elif name == 'kohlschuetter':
        return KohlschuetterFeatures()
    elif name == 'readability':
        return ReadabilityFeatures()
    elif name == 'weninger':
        return WeningerFeatures()
    elif name == 'clustered_weninger':
        return ClusteredWeningerFeatures()
    else:
        raise ValueError('invalid feature name: "{}"'.format(name))
536044
def type_named(obj, name):
    
    # if obj is a member of the named class, return True
    name = str(name)
    if obj.__class__.__name__ == name:
        return obj.__class__
    for base in type_bases(obj):
        if base.__name__ == name:
            return base
    raise ValueError('Unable to extract class of name ' + name)
280115
def get_property(self, name):
        
        for prop in self.resource.properties:
            if prop.name == name:
                return prop

        raise AttributeError(name)
1148310
def get(self, name_or_klass):
        
        if not isinstance(name_or_klass, str):
            name_or_klass = name_or_klass.__name__
        return self._extensions[name_or_klass]
1289680
def get_property_description(self, name):
        
        if not isinstance(name, basestring):
            raise TypeError("name can only be an instance of type basestring")
        description = self._call("getPropertyDescription",
                     in_p=[name])
        return description
539407
def find(cls, name):
        ''''''
        if not cls.mapping:  # pragma: no branch
            for _, obj in inspect.getmembers(exceptions):
                if inspect.isclass(obj):
                    if issubclass(obj, exceptions.NSQException):  # pragma: no branch
                        if hasattr(obj, 'name'):
                            cls.mapping[obj.name] = obj
        klass = cls.mapping.get(name)
        if klass == None:
            raise TypeError('No matching exception for %s' % name)
        return klass
714224
def get_class(self, name):
        
        for i in self.get_classes():
            if i.get_name() == name:
                return i
        return None
1068574
def find_instance(self, name, module=None):
        """"""
        module = module if module is not None else ffi.NULL
        definstance = lib.EnvFindInstance(self._env, module, name.encode(), 1)
        if definstance == ffi.NULL:
            raise LookupError("Instance '%s' not found" % name)

        return Instance(self._env, definstance)
1206443
def fromProfileName(cls, name):
        
        session = bones.SessionAPI.fromProfileName(name)
        return cls(session)
437949
def get_field_by_name(self, name):
        

        for f in self.fields:
            if f.get_name() == name:
                return f
        return None
148278
def get_instance_of(self, model_cls):
        
        for obj in self.data.values():
            if isinstance(obj, model_cls):
                return obj
        LOGGER.error('Context Not Found')
        raise Exception('Context Not Found')
213265
def GetPresetByName(self, name):
    
    name = name.lower()
    return self._definitions.get(name, None)
969338
def get(self, name, strict=True):
        """"""
        if not isinstance(name, str) or name.startswith('_'):
            raise AttributeError(self.__class__.__name__, name)
        elif strict and name not in self._possible_attributes:
            raise AttributeError('%s is not a valid attribute of %r.' %
                                 (name, self))
        elif name in self._attributes:
            return self._attributes[name]
        else:
            raise exceptions.AttributeNotProvided(name)
1346343
def require(self, name):
        """"""
        value = self.get(name)
        if value is None:
            raise TypeError(
                "{0} requires the parameter '{1}'.".format(
                    self.__class__, name
                )
            )
        return value
854569
public boolean getFeature(String name) throws IllegalArgumentException {
		if (name == null) {
			throw new IllegalArgumentException("feature name can not be null");
		}
		if (FEATURE_NAMES_INTERNED.equals(name)) {
			return namesInterned;
		} else if (FEATURE_SERIALIZER_ATTVALUE_USE_APOSTROPHE.equals(name)) {
			return attributeUseApostrophe;
		} else {
			return false;
		}
	}
220574
def namedObject(name):
    
    classSplit = name.split('.')
    module = namedModule('.'.join(classSplit[:-1]))
    return getattr(module, classSplit[-1])
708921
def get_class_by_name!(name , super_class = :Object)
      c = get_class_by_name(name)
      return c if c
      create_class( name ,super_class)
    end