예제 #1
0
 def __init__(
     self,
     start_offset=NegativeInfinity,
     stop_offset=Infinity,
     annotation=None,
     ):
     Timespan.__init__(
         self,
         start_offset=start_offset,
         stop_offset=stop_offset,
         )
     self._annotation = annotation
예제 #2
0
 def __init__(
     self,
     start_offset=NegativeInfinity,
     stop_offset=Infinity,
     annotation=None,
     ):
     Timespan.__init__(
         self,
         start_offset=start_offset,
         stop_offset=stop_offset,
         )
     self._annotation = annotation
예제 #3
0
 def __init__(
     self,
     start_offset=NegativeInfinity,
     stop_offset=Infinity,
     used=False,
     ):
     if start_offset is None:
         start_offset = NegativeInfinity
     if stop_offset is None:
         stop_offset = Infinity
     Timespan.__init__(
         self,
         start_offset=start_offset,
         stop_offset=stop_offset,
         )
     self._used = bool(used)
예제 #4
0
 def __init__(
     self,
     start_offset=NegativeInfinity,
     stop_offset=Infinity,
     used=False,
 ):
     if start_offset is None:
         start_offset = NegativeInfinity
     if stop_offset is None:
         stop_offset = Infinity
     Timespan.__init__(
         self,
         start_offset=start_offset,
         stop_offset=stop_offset,
     )
     self._used = bool(used)
예제 #5
0
 def _get_timespan(self, in_seconds=False):
     if len(self):
         timespan_ = self[0]._get_timespan(in_seconds=in_seconds)
         start_offset = timespan_.start_offset
         timespan_ = self[-1]._get_timespan(in_seconds=in_seconds)
         stop_offset = timespan_.stop_offset
     else:
         start_offset = Duration(0)
         stop_offset = Duration(0)
     return Timespan(
         start_offset=start_offset,
         stop_offset=stop_offset,
     )