Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ Lib/test/test_dataclasses/ @ericvsmith

# Dates and times
Doc/**/*time.rst @pganssle @abalkin
Doc/library/datetime-* @pganssle
Doc/library/zoneinfo.rst @pganssle
Include/datetime.h @pganssle @abalkin
Include/internal/pycore_time.h @pganssle @abalkin
Expand Down
31 changes: 31 additions & 0 deletions Doc/library/datetime-inheritance.dot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagram in pathlib is useful as the inheritance is non-standard. I don't think that's the case here, perhaps the only such instance is date <- datetime. What's the justification for adding it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the justification for adding it?

The diagram is already in the documentation, albeit in textual form.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Used to generate datetime-inheritance.svg with Graphviz
// (https://graphviz.org/) for the datetime documentation.

digraph {
comment="Generated with datetime-inheritance.dot"
graph [
bgcolor="transparent"
fontnames="svg"
layout="dot"
ranksep=0.5
nodesep=0.5
splines=line
]
node [
fontname="Courier"
fontsize=14.0
shape=box
style=rounded
margin="0.15,0.07"
]
edge [
arrowhead=none
]

object -> tzinfo
object -> timedelta
object -> time
object -> date
tzinfo -> timezone
date -> datetime
}
84 changes: 84 additions & 0 deletions Doc/library/datetime-inheritance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading