(self, year=None, month=None, day=None)
return type(self)(year, month, day)
Return a new date with new values for the specified fields.
Return a new date with new values for the specified fields.
Return a new date with new values for the specified fields .
def replace(self, year=None, month=None, day=None):
        """Return a new date with new values for the specified fields."""
        if year is None:
            year = self._year
        if month is None:
            month = self._month
        if day is None:
            day = self._day
        return type(self)(year, month, day)
def replace ( self , year = None , month = None , day = None ) : if year is None : year = self . _year if month is None : month = self . _month if day is None : day = self . _day return type ( self ) ( year , month , day )