
On Sat, Jan 23, 2021 at 12:37 PM Inada Naoki songofacandy@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