(self, xs: Iterable[ast.expr])
return lists
Split `xs` to separate list by Starred.
Split `xs` to separate list by Starred.
Split xs to separate list by Starred .
def _split_by_starred(self, xs: Iterable[ast.expr]) -> List[Splitted]:
        """Split `xs` to separate list by Starred."""
        lists = [[]]  # type: List[Splitted]
        for x in xs:
            if isinstance(x, ast.Starred):
                lists.append(x)
                lists.append([])
            else:
                assert isinstance(lists[-1], list)
                lists[-1].append(x)
        return lists
def _split_by_starred ( self , xs : Iterable [ ast . expr ] ) -> List [ Splitted ] : lists = [ [ ] ] # type: List[Splitted] for x in xs : if isinstance ( x , ast . Starred ) : lists . append ( x ) lists . append ( [ ] ) else : assert isinstance ( lists [ - 1 ] , list ) lists [ - 1 ] . append ( x ) return lists