On Fri, Feb 5, 2021 at 8:20 AM Ben Rudiak-Gould <benrudiak@gmail.com> wrote:
It seems as though most of those commenting in the other thread don't actually use Python on Windows. I do, and I can say it's a royal pain to have to write open(path, encoding='utf-8') all the time. If you could write open(path, 'r', 'utf-8'), that would be slightly better, but the third parameter is buffering, not encoding, and open(path, 'r', -1, 'utf-8') is not very readable.
FWIW, I had another idea that adding `open_utf8()` function for same motivation. `open_utf8(filename)` is easier to type than `open(filename, encoding="utf-8")`. But no one support the idea. Everyone think `encoding="utf-8"` is better than this alias function. See this thread. https://mail.python.org/archives/list/python-ideas@python.org/thread/PZUYJ5X... Regards,