Construct a List containing type 'klazz'.
177356
def create(type_dict, *type_parameters):
    
    assert len(type_parameters) == 1
    klazz = TypeFactory.new(type_dict, *type_parameters[0])
    assert isclass(klazz)
    assert issubclass(klazz, Object)
    return TypeMetaclass('%sList' % klazz.__name__, (ListContainer,), {'TYPE': klazz})
1121187
def _build_list_params(param_name, key, values):
        """"""
        params = {}
        if hasattr(values, '__iter__'):
            index = 0
            for value in values:
                params[str(param_name) + '[' + str(index) + '].' + str(key)] = str(value)
                index += 1
        else:
            params[str(param_name) + '[0].' + str(key)] = str(values)
        return params
681478
def _type_container(self, value, _type):
        '  '
        if value is None:
            # normalize null containers to empty list
            return []
        elif not isinstance(value, list):
            raise ValueError("expected list type, got: %s" % type(value))
        else:
            return sorted(self._type_single(item, _type) for item in value)
424640
def buildFileList(input, output=None, ivmlist=None,
                wcskey=None, updatewcs=True, **workinplace):
    
    newfilelist, ivmlist, output, oldasndict, filelist = \
        buildFileListOrig(input=input, output=output, ivmlist=ivmlist,
                    wcskey=wcskey, updatewcs=updatewcs, **workinplace)
    return newfilelist, ivmlist, output, oldasndict
1320335
def __construct_list(self, list_value):
        
        array = []
        for value in list_value:
            array.append(self.__iterate_value(value))
        return array
1164411
def DEFINE_list(self, name, default, help, constant=False):
    """"""
    self.AddOption(
        type_info.List(
            name=name,
            default=default,
            description=help,
            validator=type_info.String()),
        constant=constant)
74139
def build_list(self):
        """"""
        ret = []
        for p in self.args.stdout.split(','):
            if '.' in p:
                p, a = p.split('.')
            else:
                a = None
            ret.append((p, a))
        return ret
1064827
private static Constructor<?> findConstructorForInnerClass(final Class<?> klazz, final Class<?> declaringClass) {
    final Constructor<?>[] constructors = klazz.getDeclaredConstructors();
    if (constructors.length == 1) {
      return constructors[0];
    }
    for (final Constructor<?> c : constructors) {
      final Class<?>[] params = c.getParameterTypes();
      if (params.length == 1 && params[0] == declaringClass) {
        return c;
      }
    }
    return constructors[0];
  }
830917
def juggle_types(data):
    """"""
    # Data is a list of lists (2D) and not a single column table (1D)
    if isinstance(data[0], list):
        return [[force_int(col) for col in row] for row in data]

    # Data is 1D
    elif isinstance(data, list):
        return [force_int(i) for i in data]
    else:
        return data
923360
public static Matcher<Class<?>> subclassOf(final Class<?> klazz) {
    return new Matcher<Class<?>>() {

      @Override
      protected boolean matchesSafely(Class<?> t) {
        return klazz.isAssignableFrom(t);
      }

      @Override
      public String toString() {
        return "a subtype of " + klazz;
      }
    };
  }
372960
def itertypes(iterable):
    """"""
    seen = set()
    for entry in iterable:
        if isinstance(entry, tuple):
            for type_ in entry:
                if type_ not in seen:
                    seen.add(type_)
                    yield type_
        else:
            if entry not in seen:
                seen.add(entry)
                yield entry
1054719
def nl_list_entry(ptr, type_, member):
    """"""
    if ptr.container_of:
        return ptr.container_of
    null_data = type_()
    setattr(null_data, member, ptr)
    return null_data
496068
def as_list(x):
    ''''''
    
    if x is None:
        x = []
    elif not isinstance(x, Sequence):
        x = [x]
    return list(x)
518930
def get_python_list(scala_list):
    """"""
    python_list = []
    for i in range(scala_list.length()):
        python_list.append(scala_list.apply(i))
    return python_list
703575
def get_list
      list = Array.new(12, 0)

      begin
        if @target == 14
          list[10] = Const::KIND if @bin[:ipts][11][1] > 0
          return list
        end
        if @target == 15
          list[11] = Const::KIND if @bin[:ipts][12][1] > 0
          return list
        end
        [@target, @center].each do |k|
          list[k - 1] = Const::KIND if k <= 10
          list[2]     = Const::KIND if k == 10
          list[9]     = Const::KIND if k ==  3
          list[2]     = Const::KIND if k == 13
        end
        return list
      rescue => e
        raise
      end
    end
12099
def make_constructor_list(self, constructor_nodes, classname):
        """"""
        if constructor_nodes == []:
            return
        self.add_text(['\n', 'Constructors',
                       '\n', '------------'])
        for n in constructor_nodes:
            self.add_text('\n')
            self.add_line_with_subsequent_indent('* ' + self.get_function_signature(n))
            self.subnode_parse(n, pieces = [], indent=4, ignore=['definition', 'name'])
661368
def _initialize_lists(model_class, name, bases, attrs):
    """"""
    model_class._lists = {}
    for k, v in attrs.iteritems():
        if isinstance(v, ListField):
            model_class._lists[k] = v
            v.name = v.name or k