Propagate to list elements.
507818
def clean(self, value):
        
        value = super(ListField, self).clean(value)
        if value is not None:
            return map(self.itemspec.clean, value)
512653
def insert(self, i, x):
        """"""
        if not isinstance(x, str):
            raise TypeError(
                'Members of this object must be strings. '
                'You supplied \"%s\"' % type(x))
        list.insert(self, i, x)
526297
def _propagate_packages(self):
        
        """

        super()._propagate_packages()

        for item in (self.preamble):
            if isinstance(item, LatexObject):
                if isinstance(item, Container):
                    item._propagate_packages()
                for p in item.packages:
                    self.packages.add(p)
1369271
def append(self, list_name, value):
        """"""
        with self.lock:
            l = self.lists.get(list_name)
            if l:
                l.append(value)
            else:
                l = [value]
            self.lists[list_name] = l
306189
def iflatten(L):
    """"""
    for sublist in L:
        if hasattr(sublist, '__iter__'):
            for item in iflatten(sublist): yield item
        else: yield sublist
1315612
def flatten_list(node):
    
    flat_elems = []
    for elem in node:
        if elem == 'expr1024':
            for subelem in elem:
                assert subelem == 'expr32'
                for subsubelem in subelem:
                    flat_elems.append(subsubelem)
        elif elem == 'expr32':
            for subelem in elem:
                assert subelem == 'expr'
                flat_elems.append(subelem)
        else:
            flat_elems.append(elem)
            pass
        pass
    return flat_elems
563498
def generic_visit(self, node):
        """"""
        for _, value in ast.iter_fields(node):
            if isinstance(value, list):
                self._handle_ast_list(value)
                for item in value:
                    if isinstance(item, ast.AST):
                        self.visit(item)
            elif isinstance(value, ast.AST):
                self.visit(value)
1356233
def extendlist(lst, i, value=''):
    """"""
    if i < len(lst):
        pass
    else:
        lst.extend([value, ] * (i - len(lst) + 1))
1190460
private R pushExprList(ExpressionList<T> list) {
    if (textMode) {
      textStack.push(list);
    } else {
      whereStack.push(list);
    }
    return root;
  }
630689
def mset_list(item, index, value):
    ''
    if isinstance(index, (int, slice)):
        item[index] = value
    else:
        map(item.__setitem__, index, value)
1044756
def on_listcomp(self, node):    # ('elt', 'generators')
        """"""
        out = []
        for tnode in node.generators:
            if tnode.__class__ == ast.comprehension:
                for val in self.run(tnode.iter):
                    self.node_assign(tnode.target, val)
                    add = True
                    for cond in tnode.ifs:
                        add = add and self.run(cond)
                    if add:
                        out.append(self.run(node.elt))
        return out
685330
def append(self, val):
        """"""
        val.scraper = self.scraper
        val._collection_path = copy(self.collection._collection_path)
        val._collection_path.append(val)
        super(ItemList, self).append(val)
800472
def mutate(self, node, index):
        """"""
        assert index == 0
        assert isinstance(node, ForStmt)

        empty_list = parso.parse(' []')
        node.children[3] = empty_list
        return node
14083
def visit_list(self, node, parent):
        """"""
        context = self._get_context(node)
        newnode = nodes.List(
            ctx=context, lineno=node.lineno, col_offset=node.col_offset, parent=parent
        )
        newnode.postinit([self.visit(child, newnode) for child in node.elts])
        return newnode
1035793
def descendants(self):
        """"""
        for i in self.current_item.items:
            self.move_to(i)
            if i.type == TYPE_COLLECTION:
                for c in self.children:
                    yield c
            else:
                yield i
            self.move_up()
1317195
def translate_list(cls, val):
        """"""
        escaped = ', '.join([cls.translate(v) for v in val])
        return 'Seq({})'.format(escaped)
395723
public void pollAllToList(List<T> retList) {
    while (head != null) {
      retList.add(head.element);
      head = head.after;
    }
    this.clear();
  }