import itertools


def unpack_default(iterable, length=3, default=None):
    """
    Unpacks given iterable maintaining given length and filling missing
    entries with given default.

    Parameters
    ----------
    iterable : object
        Iterable.
    length : int
        Iterable length.
    default : object
        Filling default object.

    Returns
    -------
    iterable
    """

    return itertools.islice(
        itertools.chain(iter(iterable), itertools.repeat(default)), length)