This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients docs@python, eric.smith, kcirtsew, serhiy.storchaka, steven.daprano
Date 2020-02-11.13:34:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20200211133442.GM8273@ando.pearwood.info>
In-reply-to <1581073946.77.0.371242797253.issue39574@roundup.psfhosted.org>
Content
Sorry everyone, due to technology problems I am unable to comment on the 
github page, and due to ISP problems I've been off the internet for a 
few days.

> pull_request: https://github.com/python/cpython/pull/18401

[Serhiy]
> Is not "or both" redundant?

I don't think so. In regular English, "or" can imply exclusive-or:

    "Shall we eat at the Thai or the Italian restaurant?"

There are four relevant cases:

- supply neither encoding nor errors;
- supply only encoding;
- supply only errors;
- supply both encoding and errors.

Using "or" may be, for some readers, ambiguous: is the last option 
included or not? For the sake of two extra words, let's make it clear 
and unambiguous.

[Serhiy]
> Use just 'utf-8' instead of sys.getdefaultencoding(). It is a 
> constant in Python 3.

I didn't know that. I'm okay with that change, thank you.

[Serhiy]
> - str(bytes_or_buffer[, encoding[, errors]]) -> str
> + str(bytes_or_buffer, encoding='utf-8', errors='strict') -> str

I'm happy with that.

Thank you everyone, and sorry again that I have trouble with the Github 
process. (I need a new computer with a newer OS.)
History
Date User Action Args
2020-02-11 13:34:48steven.dapranosetrecipients: + steven.daprano, eric.smith, docs@python, serhiy.storchaka, kcirtsew
2020-02-11 13:34:48steven.dapranolinkissue39574 messages
2020-02-11 13:34:48steven.dapranocreate