(self, pairs: Iterable[Pair])
return result
Splits pairs to lists separated by dict unpacking statements.
Splits pairs to lists separated by dict unpacking statements.
Splits pairs to lists separated by dict unpacking statements .
def _split_by_None(self, pairs: Iterable[Pair]) -> Splitted:
        """Splits pairs to lists separated by dict unpacking statements."""
        result = [[]]  # type: Splitted
        for key, value in pairs:
            if key is None:
                result.append(value)
                result.append([])
            else:
                assert isinstance(result[-1], list)
                result[-1].append((key, value))

        return result
def _split_by_None ( self , pairs : Iterable [ Pair ] ) -> Splitted : result = [ [ ] ] # type: Splitted for key , value in pairs : if key is None : result . append ( value ) result . append ( [ ] ) else : assert isinstance ( result [ - 1 ] , list ) result [ - 1 ] . append ( ( key , value ) ) return result