summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doc/whatsnew/3.8.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index a90bc274eb..740c608418 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -115,6 +115,14 @@ Other Language Changes
a :exc:`SyntaxWarning` instead.
(Contributed by Serhiy Storchaka in :issue:`32912`.)
+* Arithmetic operations between subclasses of :class:`datetime.date` or
+ :class:`datetime.datetime` and :class:`datetime.timedelta` objects now return
+ an instance of the subclass, rather than the base class. This also affects
+ the return type of operations whose implementation (directly or indirectly)
+ uses :class:`datetime.timedelta` arithmetic, such as
+ :meth:`datetime.datetime.astimezone`.
+ (Contributed by Paul Ganssle in :issue:`32417`.)
+
New Modules
===========