-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
gh-137742: Use footnote markup for table notes in datetime
docs
#137743
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
base: main
Are you sure you want to change the base?
gh-137742: Use footnote markup for table notes in datetime
docs
#137743
Conversation
When used with the :meth:`~.datetime.strptime` method, the leading zero is optional | ||
for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%j``, ``%U``, | ||
``%W``, and ``%V``. Format ``%y`` does require a leading zero. | ||
|
||
(10) | ||
.. [#fa] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note didn't have any references (which made sphinx complain), so I added a one to the day-of-month entry in the table. For reference, this was added in #117107
@@ -653,46 +653,46 @@ Supported operations: | |||
| Operation | Result | | |||
+===============================+==============================================+ | |||
| ``date2 = date1 + timedelta`` | ``date2`` will be ``timedelta.days`` days | | |||
| | after ``date1``. (1) | | |||
| | after ``date1``. [#date1]_ | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A possible negative is that footnotes are numbered sequentially throughout the whole file instead of restarting with 1 (because of the explicit number labels starting with 1). This, for instance, becomes file footnote 7 rather that table note 1.
date2 = date1 + timedelta | date2 will be timedelta.days days after date1. [7]
in the preview. On the other hand, The links to notes and backlinks from note to table line are nice, especially when multiple, as in
[1] (1,2,3,4) This is exact but may overflow.
where 1,2,3,4 link to the 4 items with this property. This is not such a big deal on my 4K monitor, but I imagine would be very helpful with phones, and I know there are coredevs and I presume other users that use phones. Overall, I think the change is positive.
While this is quite nice, I also think it has the major downside of breaking many references to the documentation. Users who see a notice, for example in an issue comment (which I have made before), will be confused as suddenly "See Note 5" directs users to some note about timedeltas and not This would have less of an impact if this was not backported IMO. |
📚 Documentation preview 📚: https://cpython-previews--137743.org.readthedocs.build/