'Add value to the list ensuring the list is long enough to accommodate it at the given index'

def __setitem__(self, index, value):

    missing = ((index - len(self)) + 1)
    if (missing > 0):
        self.extend(([None] * missing))
    list.__setitem__(self, index, value)
