[3.8] bpo-36960: Overhaul datetime documentation (GH-13410) #16056
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a restructuring of the datetime documentation to hopefully make
them more user-friendly and approachable to new users without losing any
of the detail.
Changes include:
section primarily to remind themselves to things:
datetime
HH:MM
)in double backticks. This was previously done in some places
but not all
readability
Rationale: This doesn't really belong nested under the
'constants' section. Let readers know right away that
datetime is one of several related tools.
Previously, each type went out of its way to note separately
that it was hashable and picklable. These can be brought
into one single place that is more prominent.
Use :class:
.time
and :class:.datetime
rather than :class:time
and:class:
datetime
; otherwise, the generated links will route to therespective modules, not classes.
The top paragraph should get straight to the point of telling the reader
what subclasses of tzinfo do. Previously, that was hidden in a later
paragraph.
reasonable, real-world uses cases that are easy to follow
along with and progres in difficult slightly.
the easy examples first, progressing to more esoteric situations and
breaking it up into logical sections based on what the methods are
doing at a high level.
no interactive output involved there
See https://devguide.python.org/documenting/GH-id4
Per https://devguide.python.org/documenting/GH-source-code, this will
let the reader use the 'expand/collapse' top-right button for REPL
blocks to hide or show the prompt.
This is a combination of 66 commits.
See bpo-36960: https://bugs.python.org/issue36960
(cherry picked from commit 3fb1363)
Co-authored-by: Brad brad.solomon.1124@gmail.com