On Fri, Feb 5, 2021 at 8:20 AM Ben Rudiak-Gould <benrud...@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/PZUYJ5XDY3WDUSBFW7BAFHP3QRYES2GZ/ Regards, _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/ERGAF3IHDNDPH2MJ647KGPMFF4OWEIBE/ Code of Conduct: http://python.org/psf/codeofconduct/