Skip to content

dunder methods are not documented #28

Open
@dhalbert

Description

@dhalbert

adafruit_datetime defines a large number of "dunder" methods for date/time arithmetic and comparisons, but they are not listed in the documentation because they start with _. This is a general problem with Sphinx, though there are workarounds: see https://stackoverflow.com/questions/62142793/autosummary-generated-documentation-missing-all-dunder-methods-except-for-ini and sphinx-doc/sphinx#12858.

In the CPython documentation for datetime, written by humans, the effect of the dunder operations is listed in a big table: https://docs.python.org/3/library/datetime.html#datetime.timedelta.microseconds (following).

I told someone we didn't support date/time arithmetic, which was wrong, because I didn't see it in the documentation. We should figure out some way of making those operations visible, or list them by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions