Open 1cbe5cec-4b17-4d66-8cb1-fd06c7220667 opened 4 years ago
The datetime page in the docs is missing a lot of needed backquotes syntax for inline code samples. There are some wrong role links too, due to ambiguity in the text roles.
hello @erlend-aasland, I would like to help with this
Great, @uatach, go ahead! Let me know if you have any questions.
In PR #118068, code formatting was removed from many numeric literals; let's follow up with a PR to make that consistent across datetime.rst. The following lines still contain numeric literals marked up with double backticks:
Remark by Serhiy https://github.com/python/cpython/pull/118068#discussion_r1578039286 for L373:
I understand what it means, but it would be nice to explain what does "zero" mean. Is it already explained anywhere?
Remark by Serhiy https://github.com/python/cpython/pull/118068#discussion_r1578037224:
Should not the sentence start with the title case?
Check the whole file and fix up any incorrect capitalisation.
Remark by Serhiy #118068 (comment) for L373:
I understand what it means, but it would be nice to explain what does "zero" mean. Is it already explained anywhere?
I'm not sure if we need to define zero = 0 = nothing?
Just to make sure about the remaining changes from the old closed PR:
None
, most occurrences use backquotes but on L1738, there's a :const:None
and, on L2490, there's a None
without backquotes (#118282)local datetime
to local date and time
on L872:class:.timezone
, :class:.tzinfo
and others (#123980)@erlend-aasland I could list these as remaining, not sure if they are all still relevant or if I missed anything
- There was a change related to
None
, most occurrences use backquotes but on L1738, there's a:const:None
and, on L2490, there's aNone
without backquotes
We've been fixing up these from time to time, so there is precedent to create a PR to consistently mark up None using double backquotes throughout datetime.rst.
- There were changes related to standardize "timezone" as "time zone" [...]
- There was a change from
local datetime
tolocal date and time
on L872
I'd audit the whole file and collect all spelling issues in a single PR. Making sure the language in the reference is correct, aligns with the Diátaxis principles.
- There were changes related to italics, like the q and r on L341
Those should be marked up as variables using double backticks.
Moreover, all method and function parameters should be marked up in italics.
- There were a lot of changes related to
:class:.timezone
,:class:.tzinfo
and others
We should make sure all these links work as expected; I'd do an audit of all of them and fix any incorrect links. Also, for each reference we should make sure there's not more than one link per paragraph; that is: if tzinfo
is referenced twice in a paragraph, only create a link for the first reference.
I added a note about "Division by zero" because "zero" here is not only 0, but a timedelta
with zero duration. Is it defined as "zero" anywhere? This value is special, because it is the only timedelta
value with false boolean value.
There is also confusing line across one of tables. Either it should be removed, or the cells below it are misplaced.
Is this issue still open? I would like to contribute.
Could the docs editorial board review this?
I am not convinced of the necessity of avoiding timezone or datetime.
Timezone, like filesystem, is a form with a special meaning, now common in normal English to represent the concept.
Things like the current datetime
are not common, but they are readily understandable in the context of the python datetime module docs.
@python/editorial-board Please review thoughts on moving from timezone
in prose docs to time zone
. I'm leaning toward @merwok's perspective that the change is not a necessity. Looking for additional perspective on this.
@python/editorial-board Please review thoughts on moving from
timezone
in prose docs totime zone
. I'm leaning toward @merwok's perspective that the change is not a necessity. Looking for additional perspective on this.
There are already plenty of places where the docs use "time zone" (when referring to the general concept, not the module or object). I Googled and the consensus seems to be that it's two words.
Regarding "datetime" vs. "date time", neither is correct English. IMO the concept ought to be referred to as "date and time", or could possibly shortened as "date/time". But I'm more open to keeping "datetime" as a form of jargon we're inventing. (Though I don't feel that way about "timezone".)
IMO the concept ought to be referred to as "date and time", [...]
Yes, this is what #118449 proposes.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = None closed_at = None created_at =
labels = ['type-feature', '3.8', '3.9', '3.10', 'docs']
title = 'Wrong/missing code formats in datetime documentation'
updated_at =
user = 'https://github.com/yyyyyyyan'
```
bugs.python.org fields:
```python
activity =
actor = 'yyyyyyyan'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation =
creator = 'yyyyyyyan'
dependencies = []
files = []
hgrepos = []
issue_num = 41281
keywords = ['patch']
message_count = 1.0
messages = ['373547']
nosy_count = 6.0
nosy_names = ['ezio.melotti', 'eric.araujo', 'docs@python', 'willingc', 'mdk', 'yyyyyyyan']
pr_nums = ['21447']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue41281'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']
```
Linked PRs