def __init__(self, filename, initial): should be def __init__(self, filename, initial=[]): (that was the whole reason i put the filename first.) sorry.