On Sat, Jan 23, 2021 at 7:13 PM Chris Angelico <ros...@gmail.com> wrote:
>
> > On the other hand, if we add `open_text()`:
> >
> > * Replacing open with open_text is easier than adding `, encoding="utf-8"`.
> > * Teachers can teach to use `open_text` to open text files. Students
> > can use "utf-8" by default without knowing about what encoding is.
> >
> > So `open_text()` can provide better developer experience, without
> > waiting 10 years.
>
> But this has a far worse end goal - two open functions with subtly
> incompatible defaults, and a big question of "why should I choose this
> over that". And if you start using open_text, suddenly your code won't
> work on older Pythons.
>

Yes. There is cons too.
That's why I posted this thread before including the idea in the PEP.
Thank you for your feedback.


> >
> > Ultimate goal is make the "utf-8" default. But I don't know when we
> > can change it.
> > So I focus on what we can do in near future (< 5 years, I hope).
> >
>
> Okay. If the goal is to make UTF-8 the default, may I request that PEP
> 597 say so, please? With a heading of "deprecation", it's not really
> clear what its actual goal is.

No. I avoid it intentionally.  I am making the PEP useful even if we
can not change the default encoding.
The PEP can be discussed without discussing we can change the default
encoding or not.

Please read the first motivation section in the PEP.
https://www.python.org/dev/peps/pep-0597/#using-the-default-encoding-is-a-common-mistake

Regards,
-- 
Inada Naoki  <songofaca...@gmail.com>
_______________________________________________
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/6OIKAWIQ6OPVDJ5ZUJECZPAY4FDUOZVD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to