Message361817
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.) |
|
Date |
User |
Action |
Args |
2020-02-11 13:34:48 | steven.daprano | set | recipients:
+ steven.daprano, eric.smith, docs@python, serhiy.storchaka, kcirtsew |
2020-02-11 13:34:48 | steven.daprano | link | issue39574 messages |
2020-02-11 13:34:48 | steven.daprano | create | |
|