dates = [date(2010, 1, 8), date(2010, 1, 2), date(2010, 1, 5), date(2010, 1,
    1), date(2010, 1, 7)]
for missing in missing_dates(dates):
    pass
How do I find missing dates in a list of sorted dates?