On Sun, Jan 24, 2021 at 2:46 PM Matt Wozniski <godlyg...@gmail.com> wrote: > 2. At the same time as the deprecation is announced, introduce a new > __future__ import named "utf8_open" or something like that, to opt into the > future behavior of `open` defaulting to utf-8-sig or utf-8 when opening a > file in text mode and no explicit encoding is specified. > > I think a __future__ import solves the problem better than introducing a new > function would.
Note that, since this doesn't involve any language or syntax changes, a regular module import would work here - something like "from utf8mode import open", which would then shadow the builtin. Otherwise no change to your proposal - everything else works exactly the same way. 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/HFIMUG2JVQ2QULCWEHSXAEALSQOAY2TL/ Code of Conduct: http://python.org/psf/codeofconduct/