Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dunder methods are not documented #28

Open
dhalbert opened this issue Dec 25, 2024 · 0 comments
Open

dunder methods are not documented #28

dhalbert opened this issue Dec 25, 2024 · 0 comments

Comments

@dhalbert
Copy link
Contributor

dhalbert commented Dec 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant