def __init__(self, framerate, start_timecode=None, start_seconds=None,
                 frames=None):
        """The main timecode class.

        Does all the calculation over frames, so the main data it holds is
        frames, then when required it converts the frames to a timecode by
        using the frame rate setting.

        :param str framerate: The frame rate of the Timecode instance. It
          should be one of ['23.98', '24', '25', '29.97', '30', '50', '59.94',
          '60', 'ms'] where "ms" equals to 1000 fps. Can not be skipped.
          Setting the framerate will automatically set the :attr:`.drop_frame`
          attribute to correct value.
        :param start_timecode: The start timecode. Use this to be able to
          set the timecode of this Timecode instance. It can be skipped and
          then the frames attribute will define the timecode, and if it is also
          skipped then the start_second attribute will define the start
          timecode, and if start_seconds is also skipped then the default value
          of '00:00:00:00' will be used.
        :type start_timecode: str or None
        :param start_seconds: A float or integer value showing the seconds.
        :param int frames: Timecode objects can be initialized with an
          integer number showing the total frames.
        """
        self.drop_frame = False
        self._int_framerate = None
        self._framerate = None
        self.framerate = framerate

        self.frames = None

        # attribute override order
        # start_timecode > frames > start_seconds
        if start_timecode:
            self.frames = self.tc_to_frames(start_timecode)
        else:
            if frames is not None:  # because 0==False, and frames can be 0
                self.frames = frames
            elif start_seconds is not None:
                self.frames = self.float_to_tc(start_seconds)
            else:
                # use default value of 00:00:00:00
                self.frames = self.tc_to_frames('00:00:00:00')
def __init__ ( self , framerate , start_timecode = None , start_seconds = None , frames = None ) : self . drop_frame = False self . _int_framerate = None self . _framerate = None self . framerate = framerate self . frames = None if start_timecode : self . frames = self . tc_to_frames ( start_timecode ) else : if frames is not None : self . frames = frames elif start_seconds is not None : self . frames = self . float_to_tc ( start_seconds ) else : self . frames = self . tc_to_frames ( '00:00:00:00' )
The main timecode class.

        Does all the calculation over frames, so the main data it holds is
        frames, then when required it converts the frames to a timecode by
        using the frame rate setting.

        :param str framerate: The frame rate of the Timecode instance. It
          should be one of ['23.98', '24', '25', '29.97', '30', '50', '59.94',
          '60', 'ms'] where "ms" equals to 1000 fps. Can not be skipped.
          Setting the framerate will automatically set the :attr:`.drop_frame`
          attribute to correct value.
        :param start_timecode: The start timecode. Use this to be able to
          set the timecode of this Timecode instance. It can be skipped and
          then the frames attribute will define the timecode, and if it is also
          skipped then the start_second attribute will define the start
          timecode, and if start_seconds is also skipped then the default value
          of '00:00:00:00' will be used.
        :type start_timecode: str or None
        :param start_seconds: A float or integer value showing the seconds.
        :param int frames: Timecode objects can be initialized with an
          integer number showing the total frames.