[Python-ideas] Python 3000 TIOBE -3%

Stephen J. Turnbull stephen at xemacs.org
Mon Feb 13 05:43:35 CET 2012


Terry Reedy writes:
 > On 2/10/2012 10:32 PM, Stephen J. Turnbull wrote:
 > 
 > The issue is whether Python 3 has a "strong imposition of Unicode
 > awareness" that Python 2 does not. If the OP only meant awareness of the 
 > fact that something called 'unicode' exists, then I suppose that could 
 > be argued. I interpreted the claim as being about some substantive 
 > knowledge of unicode.

I interpreted the claim as being about changing their coding practice,
including maintaining existing scripts and modules that deal with
textual input that people may need/want to transition to Python 3.  As
Paul Moore pointed out, adding "encoding='latin-1'" to their scripts
doesn't come naturally to everyone.

I'm sure that at a higher level, that's the stance you intend to take,
too.  I think there's a disconnect between that high-level stance, and
the interpretation that it's about "substantive knowledge of Unicode".

 > In any case, the claim that I disagree a not about people's
 > reactions to Python 3 or about human psychology and the propensity
 > to stick with the known.

OK.  But then I think you are failing to deal with the problem,
because I think *that* is the problem.  Python 3 doesn't lack simple
idioms for making (most naive, near-English) processing look like
Python 2 to a greater or lesser extent.  The question is which of
those idioms we should teach, and AFAICS what's controversial about
that depends on human psychology, not on the admitted facts about
Python 3.

 > In response to Jim Jewett, you wrote
 >  > The fact is that with a little bit of knowledge, you can almost
 >  > certainly get more reliable (and in case of failure, more debuggable)
 >  > results from Python 3 than from Python 2.
 > 
 > That is pretty much my counterclaim, with the note that the 'little
 > bit of knowledge' is most about non-unicode encodings and the
 > change to some Python details.

And my counterrebuttal is "true -- but that's not what these users
want, and they probably don't need it."  That is, they don't want to
debug a crash when they don't care what happens to non-ASCII in their
mostly-ASCII, nearly-readable-as-English byte streams.

 > > The point is that the user case you discuss is a toy case.
 > 
 > Thanks for dismissing me and perhaps a hundred thousand users as a
 > 'toy cases'.

Thanks for unwarrantedly dissing me.  I do *not* dismiss people.  I
claim that the practical use case for these users is *not* 6-sigma-
pure ASCII.  You, too, will occasionally see Mr. Fuentes or even his
Israeli sister-in-law show up in your "pure ASCII, or so I thought"
texts.  Better-than-Ivory-soap-pure *is* a "toy" case.  Only in one's
own sandbox can that be guaranteed.  Otherwise, Python 3 needs to be
instructed to prepare for (occasional) non-ASCII.

 > Exactly, and finding the Python 3 version of the magic spells
 > needed in various cases, so they can be documented and publicized,
 > is what I have been trying to do. For ascii-only use, the magic
 > spell in 'ascii' in bytes() calls.

Except that AFAIK Python 3 already handles pure ASCII pretty much
automatically.  But pure ASCII doesn't exist for most people any more,
even in Kansas; that magic spell will crash.  'latin-1' is a much
better spell (except for people who want to crash in appropriate
circumstances -- but AFAIK in the group whose needs this thread
addresses, they are a tiny minority).

 > > I don't know of any nice way to say that.
 > 
 > There was no need to say it.

Maybe not, but I think there was.  Some of your well-intended
recommendations are unrealistic, and letting them pass would be a
disservice to the users we are *both* trying to serve.




More information about the Python-ideas mailing list