On 2/10/2021 10:29 AM, Paul Moore wrote:
On Wed, 10 Feb 2021 at 14:33, Anders Munch <a...@flonidan.dk> wrote:
The idea is to make is so that working code only needs to change once, even
when supporting multiple Python versions.
That one change is to add either an explicit encoding=None (for
backwards-compatibility) or an explicit encoding='utf-8' (because that was
intended all along). No twice about it, one change.
But then people who added an explicit utf-8 encoding need to remove
the encoding argument again once the default value changes. Your
proposal leads to a situation where no-one leaves the encoding
argument to default. If we're going to permanently discourage omitting
the encoding argument, we should just make it mandatory (a change that
I'll argue against, but no-one is currently proposing it, luckily).
Except that all code written after the default has changed (and all
python versions without that default are no longer supported) won't need
to specify utf-8. And presumably there's more code to be written in the
future than already exists.
Eric
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/EG5UUYGC2R36NPXBDKFTFDKUYSYHP6JR/
Code of Conduct: http://python.org/psf/codeofconduct/