From c93a46abd1d9cbad46ee71fa1201a8d1409521e7 Mon Sep 17 00:00:00 2001 From: Utkarsh Upadhyay Date: Fri, 28 Jul 2017 13:49:23 +0200 Subject: [PATCH 1/2] Update 'Porting to .37' section. --- Doc/whatsnew/3.7.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 023d0a1b238089d..21e9c568ae42419 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -455,6 +455,9 @@ Changes in the Python API :func:`socket.fromshare` a socket :func:`~socket.socket.share`-ed in older Python versions. +* ``repr`` for :class:`datetime.timedelta` has changed to include keyword arguments + in the output. (Contributed by Utkarsh Upadhyay in :issue:`30302`.) + CPython bytecode changes ------------------------ From 32c30968d444a5c70257f37247f2cc8f5fd08ae1 Mon Sep 17 00:00:00 2001 From: Utkarsh Upadhyay Date: Fri, 28 Jul 2017 13:55:11 +0200 Subject: [PATCH 2/2] Fix a minor example in the doc. --- Doc/library/datetime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 625e1590a87b843..3880c2eb0b79f02 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -313,7 +313,7 @@ Notes: unusual results for negative timedeltas. For example: >>> timedelta(hours=-5) - datetime.timedelta(-1, 68400) + datetime.timedelta(days=-1, seconds=68400) >>> print(_) -1 day, 19:00:00