Unicode [was Re: Cult-like behaviour]

Chris Angelico rosuav at gmail.com
Mon Jul 16 17:16:48 EDT 2018


On Tue, Jul 17, 2018 at 6:32 AM, Tim Chase
<python.list at tim.thechases.com> wrote:
> On 2018-07-16 18:31, Steven D'Aprano wrote:
>> You say that all you want is a switch to turn off Unicode (and
>> replace it with what? Kanji strings? Cyrillic? Shift_JS? no of
>> course not, I'm being absurd -- replace it with ASCII, what else
>> could any right-thinking person want, right?).
>
> But we already have this.  If I want to turn off Unicode strings, I
> type "python2", and if I want to enable Unicode strings, I type
> "python3".
>
> While the python world has moved its efforts into improving Python3,
> Python2 hasn't suddenly stopped working.  It just stopped receiving
> improvements.  If the "old-man shakes-fist at progress" crowd
> doesn't like unicode stings in Py3, just keep on using Py2.  You
> (generic) won't get arrested.  There are no church^WPython police.

Except that Python 2 still supports Unicode, and Python 3 still
supports bytes. Py3 just makes a stronger distinction between text and
bytes.

>>> b"Hello, %s!" % b"world"
b'Hello, world!'

ChrisA


More information about the Python-list mailing list