From d9645c0e6904a45b662717054dca89c0c27656b9 Mon Sep 17 00:00:00 2001 From: edson duarte Date: Tue, 3 Sep 2024 18:29:22 -0300 Subject: [PATCH 1/2] Replace instance attributes table --- Doc/library/datetime.rst | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index b8b442508becbb..22ca0b0727b87b 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -283,17 +283,23 @@ Class attributes: Note that, because of normalization, ``timedelta.max`` is greater than ``-timedelta.min``. ``-timedelta.max`` is not representable as a :class:`timedelta` object. + Instance attributes (read-only): -+------------------+--------------------------------------------+ -| Attribute | Value | -+==================+============================================+ -| ``days`` | Between -999999999 and 999999999 inclusive | -+------------------+--------------------------------------------+ -| ``seconds`` | Between 0 and 86399 inclusive | -+------------------+--------------------------------------------+ -| ``microseconds`` | Between 0 and 999999 inclusive | -+------------------+--------------------------------------------+ +.. attribute:: timedelta.days + + Between ``-999999999`` and ``999999999`` inclusive. + + +.. attribute:: timedelta.seconds + + Between ``0`` and ``86399`` inclusive. + + +.. attribute:: timedelta.microseconds + + Between ``0`` and ``999999`` inclusive. + Supported operations: From 27b0068d17ae07b127c8580a7b9829f965560d7e Mon Sep 17 00:00:00 2001 From: edson duarte Date: Wed, 4 Sep 2024 15:29:14 -0300 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- Doc/library/datetime.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 22ca0b0727b87b..0e7dc4f262bab4 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -288,17 +288,17 @@ Instance attributes (read-only): .. attribute:: timedelta.days - Between ``-999999999`` and ``999999999`` inclusive. + Between -999,999,999 and 999,999,999 inclusive. .. attribute:: timedelta.seconds - Between ``0`` and ``86399`` inclusive. + Between 0 and 86,399 inclusive. .. attribute:: timedelta.microseconds - Between ``0`` and ``999999`` inclusive. + Between 0 and 999,999 inclusive. Supported operations: