def __init__(self, intervals, mid):
    """Constructor; see class docstring for parameter details."""
    self.starts = copy.copy(intervals)  # shallow copies
    self.ends = copy.copy(intervals)
    self.starts = sorted(self.starts, key=lambda x: x.start)
    self.ends = sorted(self.ends, key=lambda x: x.end)
    self.mid = mid
def __init__ ( self , intervals , mid ) : self . starts = copy . copy ( intervals ) self . ends = copy . copy ( intervals ) self . starts = sorted ( self . starts , key = lambda x : x . start ) self . ends = sorted ( self . ends , key = lambda x : x . end ) self . mid = mid
Constructor; see class docstring for parameter details.