def dictFromSequence(seq):
    """Translates a sequence into a dictionary by converting each to elements of
    the sequence (k,v) into a k:v pair in the dictionary

    :param seq: (sequence) any sequence object
    :return: (dict) dictionary built from the given sequence"""
    def _pairwise(iterable):
        """Utility method used by dictFromSequence"""
        itnext = iter(iterable).__next__
        while True:
            yield itnext(), itnext()
    return dict(_pairwise(seq))