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
Python 3.9.14: grammar/clarity improvements for str.encode, str.decode error-checking documentation #99991
Comments
do you have recommendations on how to improve them |
It's not easy, but I'll try - here's an attempt for
Process used
So looking at the text, there seemed to be a few steps to refactor it:
Note:
|
Thanks. I'll work on that. |
Ah: I forgot to mention debug builds in this suggestion. Similar to development-mode, debug builds also validate the errors argument. A simple check to test whether error-handler-name-validation is enabled is to attempt encoding using an invalid error-handler-name. For example, |
By the way, thanks for your comprehensive and insightful feedback, @jayaddison ! We'd love to have more of it elsewhere, and you're welcome to contribute the changes yourself if you like—you seem to have quite a knack for documentation writing, which makes a big positive impact on the community. Thanks again! |
Thanks for the kind words @CAM-Gerlach! There are more than a few similarities between good code and good documentation, I think |
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Thanks, looks like everything is merged! |
jayaddison commentedDec 4, 2022
•
edited by bedevere-bot
Documentation
The are a couple of paragraphs about error-checking behaviour for
str.encode
andstr.decode
that appears in a few versions of Python and could potentially be improved in future versions.As found in the Python 3.9.14 documentation for
std.encode
:The paragraph before that is fairly dense - there could be an opportunity to improve both of them.
Linked PRs
The text was updated successfully, but these errors were encountered: