Return list from elements of scala.collection.immutable.List
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
793473
def degenerate(enumerable):
    '''
    
    '''
    if (isinstance(enumerable, xrange) or
        inspect.isgeneratorfunction(enumerable) or
        inspect.isgenerator(enumerable)):
        return list(enumerable)
    return enumerable
1192663
@Override
    public <U> CollectionX<U> unitIterable(final Iterable<U> u) {
        return ListX.fromIterable(u);
    }
1226701
@Nonnull
    @SafeVarargs
    public static <A> ImmutableList<A> from(@Nonnull A... el) {
        return fromBounded(el, 0, el.length);
    }
171078
def lists(self, value, key=None):
        
        results = map(lambda x: x[value], self._items)

        return list(results)
956958
private <T> List<T> immutableAdd(List<T> list, T element) {
      List<T> result = new ArrayList<T>(list);
      result.add(element);
      return Collections.unmodifiableList(result);
   }
393704
@SuppressWarnings("unchecked")
	public static <T> List<T> toList(Class<T> elementType, Object value) {
		return (List<T>) toCollection(ArrayList.class, elementType, value);
	}
662337
public static <T> List<T> list(boolean isLinked, Iterable<T> iterable) {
		if (null == iterable) {
			return list(isLinked);
		}
		return list(isLinked, iterable.iterator());
	}
708753
public static <E> List<E> copyOf(Iterable<? extends E> elements) {
    Preconditions.checkNotNull(elements, "elements");
    List<E> result = (elements instanceof Collection)
        // can pre-allocate the array
        ? new ArrayList<>(cast(elements).size())
        // cannot
        : new ArrayList<>();
    for (E e : elements) {
      result.add(e);
    }
    return Collections.unmodifiableList(result);
  }
470397
def pull(iterable, n):
    
    fifo = collections.deque(maxlen=n)
    for i in iterable:
        fifo.append(i)
    return list(fifo)
85210
def _as_list(obj):
    """"""
    if obj is None:
        return None
    elif isinstance(obj, string_types):
        return [obj]
    elif isinstance(obj, tuple):
        return list(obj)
    elif not hasattr(obj, '__len__'):
        return [obj]
    else:
        return obj
258804
function from(collection) {
  const result = [];
  const length = collection.length;
  let idx = -1;
  while (++idx < length) {
    result[idx] = collection[idx];
  }
  return result;
}
661775
def make_list(obj, cast=True):
    
    if isinstance(obj, list):
        return list(obj)
    if isinstance(obj, types.GeneratorType):
        return list(obj)
    if isinstance(obj, (tuple, set)) and cast:
        return list(obj)
    else:
        return [obj]
1016366
private static <E> Collection<E> toCollection(Iterable<E> iterable) {
		return (iterable instanceof Collection) ? (Collection<E>)iterable : Lists.newArrayList(iterable.iterator());
	}
373251
def get_elements(self, object_list):
        
        result = []
        for item in object_list:
            if isinstance(item, list):
                result += self.get_elements(item)
            elif isinstance(item, TranslatableModel):
                result.append(item)
        return result
1144075
public static ImmutableList<Symbol> listFrom(final Iterable<String> strings) {
    checkNotNull(strings);
    return FluentIterable.from(strings)
        .transform(Symbolize)
        .toList();
  }
1141743
public static <T> List<T> copyOf(Collection<T> source) {
        Preconditions.checkNotNull(source);
        if (source instanceof ImmutableList<?>) {
            return (ImmutableList<T>) source;
        }
        if (source.isEmpty()) {
            return Collections.emptyList();
        }
        return ofInternal(source.toArray());
    }