Test if the current statement is a type of list, used in for loops.
323820
def _is_list_iter(self):
        

        # Check for literal or memory list.
        iter_var_type = (
            self.context.vars.get(self.stmt.iter.id).typ
            if isinstance(self.stmt.iter, ast.Name)
            else None
        )
        if isinstance(self.stmt.iter, ast.List) or isinstance(iter_var_type, ListType):
            return True

        # Check for storage list.
        if isinstance(self.stmt.iter, ast.Attribute):
            iter_var_type = self.context.globals.get(self.stmt.iter.attr)
            if iter_var_type and isinstance(iter_var_type.typ, ListType):
                return True

        return False
1261426
def of_type(cls, iterable, types):
    

    return cls(x for x in iterable if isinstance(x, types))
1366348
def is_seq(arg):
    '''
    
    '''
    return isinstance(arg, (list_type, tuple_type, pyr.PVector, pyr.PList)) or is_nparray(arg)
144139
function(list, value) {
      if (_.isArray(value)) {
        for (var i = 0; i < value.length; i++) {
          var valueItem = value[i];
          if (_.contains(list, valueItem)) {
            return true;
          }
        }
        return false;
      } else {
        return _.contains(list, value);
      }
    }
1209980
def is_list_of_dict_like(obj, attr=('keys', 'items')):
    
    try:
        if len(obj) == 0:
            return False
        return all([is_dict_like(i, attr) for i in obj])
    except Exception:
        return False
1157105
function isNodeList(nodes) {
  var stringRepr = Object.prototype.toString.call(nodes)

  return typeof nodes === 'object' &&
    /^\[object (HTMLCollection|NodeList|Object)\]$/.test(stringRepr) &&
    (typeof nodes.length === 'number') &&
    (nodes.length === 0 || (typeof nodes[0] === "object" && nodes[0].nodeType > 0))
}
325128
def is_type(x, types, full=False):
    
    types = types if isinstance(types, tuple) else (types,)
    ins = isinstance(x, types)
    sub = False
    try:
        sub = issubclass(x, types)
    except Exception:
        pass
    res = ins or sub
    return res if not full else (res, ins)
865880
function isInList(value, listOfValues, msg) {
    value = value.toLowerCase().trim();
    if (listOfValues.indexOf(value) === -1) {
        throw new Error(msg);
    }
}
406217
def maybe_cast_list(value, types):
    
    if not isinstance(value, list):
        return value

    if type(types) not in (list, tuple):
        types = (types,)

    for list_type in types:
        if issubclass(list_type, list):
            try:
                return list_type(value)
            except (TypeError, ValueError):
                pass
    return value
331151
def has_value_of_type(self, var_type):
        
        if self.has_value() and self.has_type(var_type):
            return True
        return False
226326
function isNodelist(O) {
            return !!(_toString.call(O) == "[object NodeList]" || typeof O !== "undefined" && O && O[0] && O[0].nodeType == 1);
        }
1326503
def is_type(type_, *p):
    
    try:
        for i in p:
            if i.type_ != type_:
                return False

        return True
    except:
        pass

    return False
591058
def _contains_array(self, val):
        """"""
        arr = self(arr_name=val.psy.arr_name)[0]
        is_not_list = any(
            map(lambda a: not isinstance(a, InteractiveList),
                [arr, val]))
        is_list = any(map(lambda a: isinstance(a, InteractiveList),
                          [arr, val]))
        # if one is an InteractiveList and the other not, they differ
        if is_list and is_not_list:
            return False
        # if both are interactive lists, check the lists
        if is_list:
            return all(a in arr for a in val) and all(a in val for a in arr)
        # else we check the shapes and values
        return arr is val
299039
function isValueInList(list, value) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i] == value) {
            return true;
        }
    }
    return false;
}
1372399
def is_list(self, key):
        """"""
        data = self.model.get_data()
        return isinstance(data[key], (tuple, list))
382146
def is_of_types(obj, the_types):
    '''
    
    '''
    if not isinstance(obj, the_types):
        raise KittyException('object type (%s) is not one of (%s)' % (type(obj), the_types))
572909
def _type_check_pointers(utype):
    
    result = []
    for mname, member in utype.members.items():
        if ("pointer" in member.modifiers and member.D > 0 and
            (member.default is None or "null" not in member.default)):
            result.append(member)

    return result