Glyphs and graphemes [was Re: Cult-like behaviour]

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Jul 17 04:23:16 EDT 2018


On Tue, 17 Jul 2018 10:51:38 +0300, Marko Rauhamaa wrote:

> in which Python3's honor is defended in a good many of the discussions
> in this newsgroup: anger, condescension, ridicule, name-calling.

You call it defending Python 3's honour. I call it responding to people 
who insist on spreading misinformation and falsehoods even when given the 
correct details.

Some people have their self-image wrapped up in being able to portray 
themselves as a maverick who, almost alone, sees through the "lies" about 
<insert technology here> to see "the truth". Others prefer reality 
instead, and get upset when false facts are repeated, over and over 
again, as truth.

If instead you want to discuss actual concrete areas where Python's text/
bytes divide hurts, you'll find that there are plenty of people who 
agree. Especially if they have to write string-handling code that needs 
to run under both 2 and 3. Been there, done that, don't want to do it 
again.

The Python 3 redesign was done to fix certain common, hard-to-diagnose 
problems in string handling caused by Python2's violation of the Zen "in 
the face of ambiguity, refuse the temptation to guess". (Python 2 guesses 
what encoding you probably mean when it comes to strings and bytes, and 
when it gets it right it is convenient, but when it gets it wrong, it is 
badly wrong, and hard to diagnose and fix.)

It impossible to improve the text handling experience for every single 
programmer writing every single kind of program under every single set of 
circumstances. Like any semantic change, there are going to be winners 
and losers, and the core devs' position is that if the losers have 
concrete and backwards-compatible suggestions for improving their 
experience (e.g. re-adding % support for byte strings) they will consider 
them, but going back to the Python 2 misdesign is off the table.


-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson




More information about the Python-list mailing list