diff options
author | Paul Ganssle <pganssle@users.noreply.github.com> | 2019-02-08 16:02:00 (GMT) |
---|---|---|
committer | Ćukasz Langa <lukasz@langa.pl> | 2019-02-08 16:02:00 (GMT) |
commit | d9503c307a8b6a7b73f6344183602ffb014d3356 (patch) | |
tree | c370b38cbf612a8fb63260fc0b7a72f6d601a507 /Doc/whatsnew | |
parent | 96d37dbcd23e65a7a57819aeced9034296ef747e (diff) | |
download | cpython-d9503c307a8b6a7b73f6344183602ffb014d3356.zip cpython-d9503c307a8b6a7b73f6344183602ffb014d3356.tar.gz cpython-d9503c307a8b6a7b73f6344183602ffb014d3356.tar.bz2 |
Add What's New entry for date subclass behavior (#11790)
This was a backwards incompatible change and should be clearly noted.
Related bugs:
bpo-32417: https://bugs.python.org/issue32417
bpo-35364: https://bugs.python.org/issue35364
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.8.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index a90bc27..740c608 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 =========== |