Skip to content

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Feb 11, 2026

Fix some style guide infringements (case of titles, Latin abbreviations), add parameter mark up in a few places, fix a small typo, make spacing of docs consistent, and add an inheritance diagram (like pathlib's :-).

Diagram

Generated with graphviz, and:

digraph {
    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
}

📚 Documentation preview 📚: https://cpython-previews--144720.org.readthedocs.build/en/144720/library/datetime.html

StanFromIreland and others added 2 commits February 12, 2026 08:11
Co-authored-by: Petr Viktorin <encukou@gmail.com>
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.

@AA-Turner
Copy link
Member

feedback: this PR could have been more usefully structured as an optional set of style guide changes, addition of markup, and adding an image; to allow discussing each on its own merits.

Probably not worth doing now that this has been opened, but please keep in mind for the future.

A

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@StanFromIreland
Copy link
Member Author

Thanks Hugo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants