def __new__(cls, *args):
        """

        :param args: should be three ints (year, month, day)
        """
        new = super(BaseDateTuple, cls).__new__(cls)
        if BaseDateTuple._is_valid_args(args):
            if isinstance(args[0], BaseDateTuple):
                new.date = args[0].date
            else:
                new.date = (args[0], args[1], args[2])
        else:
            msg = str(args) + " has not the correct format or does not stand for a valid year. BaseDateTuple(year, month, day)"
            raise ValueError(msg)
        return new
def __new__ ( cls , * args ) : new = super ( BaseDateTuple , cls ) . __new__ ( cls ) if BaseDateTuple . _is_valid_args ( args ) : if isinstance ( args [ 0 ] , BaseDateTuple ) : new . date = args [ 0 ] . date else : new . date = ( args [ 0 ] , args [ 1 ] , args [ 2 ] ) else : msg = str ( args ) + " has not the correct format or does not stand for a valid year. BaseDateTuple(year, month, day)" raise ValueError ( msg ) return new
:param args: should be three ints (year, month, day)