import itertools


def deque_slice(deque, start, end=-1):
    """ return a sliced part of a deque as a list """
    if end == -1:
        end = len(deque)
    return list(itertools.islice(deque, start, end))