def __init__(self, *args):

        """If no parameteres are given, the Matrix44 is initialised to identity.
        If 1 parameter is given it should be an iterable with the 16 components
        of the matrix.
        If 4 parameters are given they should be 4 sequences of up to 4 values.
        Missing values in each row are padded out with values from the identity matix
        (so you can use Vector3's or tuples of 3 values).

        """


        if not args:
            self._m = [1.,0.,0.,0., 0.,1.,0.,0., 0.,0.,1.,0., 0.,0.,0.,1.]
            return


        elif len(args) == 4:
            self._m = [1.,0.,0.,0., 0.,1.,0.,0., 0.,0.,1.,0., 0.,0.,0.,1.]

            row_0, row_1, row_2, row_3 = self._setters
            r1, r2, r3, r4 = args

            row_0(self, r1)
            row_1(self, r2)
            row_2(self, r3)
            row_3(self, r4)

        else:
            raise TypeError("Matrix44.__init__() takes 0, or 4 arguments (%i given)"%len(args))
dataset/ETHPy150Open PythonProgramming/Beginning-Game-Development-with-Python-and-Pygame/Chapter 10/gameobjects/matrix44.py/Matrix44.__init__/original