Misc copyedits in docs on built-in types#24466
Conversation
The previous text can make a confusion in reader. The reader could understand the isidentifier method call the iskeyword. Now, is explicit that the dev can do it.
|
This PR is stale because it has been open for 30 days with no activity. |
|
Trying to compile I get: Warning, treated as error: cpython/Doc on pr/24466 [$] via 🐍 v3.11.0a6+ took 1m16s My environment should be ok. I did have an issue but this was made good yesterday and I am using the recommended Sphinx version, also has been compiling the Docs ok up to now. |
Doc/library/stdtypes.rst
Outdated
There was a problem hiding this comment.
-1 on this change. This makes it more verbose but doesn't significantly improve clarity, in my opinion. Instead, why not simply italicise the word "reserved"?
The other changes LGTM
There was a problem hiding this comment.
The change made here was Call --> You can call.
The current text can to let the reader to understand which is the isidentifier internally call the iskeyword method (mainly is is not a native speaker, I guess). But it is not true. So, the propose is to make explicit that the programmer must to call the function.
In the reserved was just a break line. No changed the content.
There was a problem hiding this comment.
The change made here was
Call-->You can call.
I know, but, in my opinion, the imperative mood works fine here :)
There was a problem hiding this comment.
The change made here was
Call-->You can call.I know, but, in my opinion, the imperative mood works fine here :)
I have experiences where the imperative was not fine. :)
Anyway, you are free to revert the commit (I guess). Help yourself.
Or will ask for a third opinion.
There was a problem hiding this comment.
I'm just a triager, so I don't have the power to do anything! Just giving my opinion :)
There was a problem hiding this comment.
I agree that imperative seems fine, but can you share the experiences where you found that imperative caused problems? I'd be interested in hearing the examples and seeing if they'd apply here.
There was a problem hiding this comment.
As a technical docs writer and copyeditor, imperative is generally fairly idiomatic in reference-type documentation such as this, and initially I didn't see a problem with it either.
However, looking more carefully at the context, I do see an issue with it: the imperative mood is conventionally used, as it is on the line right before, to describe what the method does. However, this next sentence instead describes what the user might want to consider doing, and the chosen phrasing, unlike the standard imperative, makes explicit that distinction that might otherwise cause confusion, especially among readers with less native English proficiency.
Of course, such asides with suggestions for the reader aren't always appropriate in reference-type documentation, especially using language like "You can", but with a tiny bit of linguistic massaging it can fit right in (unfortunately, it won't let me actually suggest here):
:func:`keyword.iskeyword` can be used to test whether string ``s`` is a
reserved identifier, such as :keyword:`def` and :keyword:`class`.I have experiences where the imperative was not fine. :)
I would also appreciate clarification here
There was a problem hiding this comment.
As a technical docs writer and copyeditor, imperative is generally fairly idiomatic in reference-type documentation such as this, and initially I didn't see a problem with it either.
However, looking more carefully at the context, I do see an issue with it: the imperative mood is conventionally used, as it is on the line right before, to describe what the method does. However, this next sentence instead describes what the user might want to consider doing, and the chosen phrasing, unlike the standard imperative, makes explicit that distinction that might otherwise cause confusion, especially among readers with less native English proficiency.
Exactly this. Especially if the native language be Portuguese.
Of course, such asides with suggestions for the reader aren't always appropriate in reference-type documentation, especially using language like "You can", but with a tiny bit of linguistic massaging it can fit right in (unfortunately, it won't let me actually suggest here):
:func:`keyword.iskeyword` can be used to test whether string ``s`` is a reserved identifier, such as :keyword:`def` and :keyword:`class`.I have experiences where the imperative was not fine. :)
I would also appreciate clarification here
One experience mine was: a "readers with less native English proficiency" read the actual text and understood that the method itself call the other method, not that the developer must do the call. So, is this reason of my suggestion.
There was a problem hiding this comment.
See suggestion implementing the above
CAM-Gerlach
left a comment
There was a problem hiding this comment.
This is a good start; I've suggested a number of refinements.
Doc/library/stdtypes.rst
Outdated
There was a problem hiding this comment.
See suggestion implementing the above
|
The checks were run long enough ago that I can't see what failed, but merging with |
|
Ah, its just failing because of some trailing whitespace, but that's already fixed in my suggestions, so just apply those and you should be good to go. FYI, in case you aren't aware, you can do so by going to the |
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Link the actual case conversion subsection of Unicode's section 3.13 Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
In fact, I was not aware about this. However, I read this comment too late. I will use this resource in a next time. Thanks for suggestions and good discussion. |
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
AlexWaygood
left a comment
There was a problem hiding this comment.
LGTM. Thanks @adorilson for the PR, and thanks @CAM-Gerlach for the detailed review comments!
|
Status check is done, and it's a success ✅. |
|
Thanks @adorilson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
|
Sorry, @adorilson, I could not cleanly backport this to |
|
Sorry @adorilson, I had trouble checking out the |
|
Backporting this is actually slightly complicated, since the 3.11 branch is still using v14 of the Unicode standard, and the links added in this PR all point to v15 of the Unicode standard. I'm not going to undertake backporting this myself, but if you want to do a manual backport to the 3.11 branch @adorilson (without the Unicode-standard-related changes), feel free to ping me, and I can get it merged. |
|
@AlexWaygood When whomever is manually backporting, the links could simply be adjusted to point to Unicode 14.0, or Unicode 13.0 for 3.10. |
Indeed they could, but on balance, I'd prefer they weren't. I think backports should generally be as minimal as possible, and should generally differ from the original PR as little as possible. This reduces the risk of discrepancies emerging between the branches, which might complicate future backports. But, I don't have a particularly strong opinion about it. |
|
It seems I'm a little confused, sorry—I thought you were suggesting above to not backport the change at all, or to completely omit a substantial part of the changes. However, it now sounds like you're suggesting backporting it as-is without changing the links, which would be the minimal delta to the original PR, and equally the lowest chance of creating merge conflicts with future backports (which is certainly a concern that I share). The next-most-minimal diff to both the original PR and between the branches would be just tweaking only the versions in the URLs, which it seems you're not in favor of, if I understand you right? |
DOC: Improvements in library/stdtypes
This PR does the following:
iskeywordfunction. The previous text could cause confusion to readers, especially those with English as a second language. The reader could understand that theisidentifiermethod calls theiskeywordfunction. Now, it is explicit that the dev can do it.Automerge-Triggered-By: GH:AlexWaygood