3 ms·
I was surprised to see the elimination of the encoding comments, I thought that the default encoding would be platform dependent. After a little research I foun
by mark-r 10y ago
I was surprised to see the elimination of the encoding comments, I thought that the default encoding would be platform dependent. After a little research I found PEP 3120 which mandates UTF-8 for everybody, implemented in Python 3.0. It also goes into the history of source encoding for 1.x and 2.x. I wonder why there aren't more problems with Windows users whose editors don't use UTF-8 by default?
- rowanseymour 10y agoMakes sense given Python 3 lets identifiers contain non-ascii characters, e.g. café=123, 变量="x"
- mark-r 10y agoI'm all-in on the usefulness of UTF-8, I wish there was a way to configure Windows to reliably use it as its default character encoding. If I create a file with Notepad containing the line café=123 and save it without specifying an encoding, I can't import it into Python. I spend a lot of time on StackOverflow and I don't remember seeing that problem come up.