On Sat, Jan 23, 2021 at 12:37 PM Inada Naoki <songofaca...@gmail.com> wrote: > ## 1. Add `io.open_text()`, builtin `open_text()`, and > `pathlib.Path.open_text()`. > > All functions are same to `io.open()` or `Path.open()`, except: > > * Default encoding is "utf-8". > * "b" is not allowed in the mode option.
I *really* don't like this, because it implies that open() will open in binary mode. > How do you think about this idea? Is this worth enough to add a new > built-in function? Highly dubious. I'd rather focus on just moving to UTF-8 as the default, rather than bringing in a new function - especially with such a confusing name. What exactly are the blockers on making open(fn) use UTF-8 by default? Can the proposals be written with that as the ultimate goal (even if it's going to take X versions and multiple deprecation phases), rather than aiming for a messy goal where people aren't sure which function to use? ChrisA _______________________________________________ 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/46RCX23FGYZY7YN4EOUL5QXYTQO6OO2H/ Code of Conduct: http://python.org/psf/codeofconduct/