def iterate_date_values(d, start_date=None, stop_date=None, default=<NUM_LIT:0>):
dataiter = iter(d)<EOL>cur_day, cur_val = next(dataiter)<EOL>start_date = start_date or cur_day<EOL>while cur_day < start_date:<EOL><INDENT>cur_day, cur_val = next(dataiter)<EOL><DEDENT>for d in iterate_date(start_date, stop_date):<EOL><INDENT>if d != cur_day:<EOL><INDENT>yield default<EOL>continue<EOL><DEDENT>yield cur_val<EOL>try:<EOL><INDENT>cur_day, cur_val = next(dataiter)<EOL><DEDENT>except StopIteration:<EOL><INDENT>if not stop_date:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>
Convert (date, value) sorted lists into contiguous value-per-day data sets. Great for sparklines.

Example::

    [(datetime.date(2011, 1, 1), 1), (datetime.date(2011, 1, 4), 2)] -> [1, 0, 0, 2]