summaryrefslogtreecommitdiffstats
path: root/Lib/_pydatetime.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_pydatetime.py')
-rw-r--r--Lib/_pydatetime.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py
index 549fcda..df616bb 100644
--- a/Lib/_pydatetime.py
+++ b/Lib/_pydatetime.py
@@ -1112,6 +1112,8 @@ class date:
day = self._day
return type(self)(year, month, day)
+ __replace__ = replace
+
# Comparisons of date objects with other.
def __eq__(self, other):
@@ -1637,6 +1639,8 @@ class time:
fold = self._fold
return type(self)(hour, minute, second, microsecond, tzinfo, fold=fold)
+ __replace__ = replace
+
# Pickle support.
def _getstate(self, protocol=3):
@@ -1983,6 +1987,8 @@ class datetime(date):
return type(self)(year, month, day, hour, minute, second,
microsecond, tzinfo, fold=fold)
+ __replace__ = replace
+
def _local_timezone(self):
if self.tzinfo is None:
ts = self._mktime()