def set_interval(self, start, end, value, compact=False):
        """Set the value for the time series on an interval. If compact is
        True, only set the value if it's different from what it would
        be anyway.

        """
        # for each interval to render
        for i, (s, e, v) in enumerate(self.iterperiods(start, end)):
            # look at all intervals included in the current interval
            # (always at least 1)
            if i == 0:
                # if the first, set initial value to new value of range
                self.set(s, value, compact)
            else:
                # otherwise, remove intermediate key
                del self[s]

        # finish by setting the end of the interval to the previous value
        self.set(end, v, compact)
def set_interval ( self , start , end , value , compact = False ) : for i , ( s , e , v ) in enumerate ( self . iterperiods ( start , end ) ) : if i == 0 : self . set ( s , value , compact ) else : del self [ s ] self . set ( end , v , compact )
Set the value for the time series on an interval. If compact is
        True, only set the value if it's different from what it would
        be anyway.