[Python-3000] PEP 3131 accepted

Leonardo Santagada santagada at gmail.com
Wed May 23 04:56:23 CEST 2007


Em 22/05/2007, às 19:08, Ka-Ping Yee escreveu:

>
> Currently Python has the property that the character set is a fully
> known quantity.  There currently exists a choice of keyboard, a choice
> of editor, and a set of literacy skills that is sufficient for any
> Python code in the world.
>
No, any python code can extend itself to infinity as python is a  
turing complete language, we probably don't even have a way to say if  
a python program ever stops, so saying that you now posses  
capabilities to understand every python program is being a little too  
confident on your hacking skillz :)

> There will exist no keyboard that enables one to
> edit any Python program, and probably no editor.
Yes you can, using only a hex editor and simple cut and paste (or  
copying hex codes in paper and the re-typing then back) can edit any  
python code.


> Today, if a non-English speaker asks you how to learn Python, you can
> answer that question.  You can explain Python's syntax and semantics,
> and tell them they need to know the 26 letters of the Roman alphabet.
Have you ever explained that to someone? "You need to know only the  
26 letters of the alphabet, plus _+=-{}[]()_0123456789!@#%^*><,./?\"  
Really? And i probably missed a lot of stuff in there. The sintax  
rules continues to be as simple as ever, identifiers can contain  
whatever character the user knows (and all he doesn't know, but then  
he is not going to be able to read it anyway).

> PEP 3131 will also cause problems for code review.  Because many
> characters have indistinguishable appearances, there will be no
> mapping between what you see when you look at code and what the code
> actually says.
This was already discussed, if your font has the same symbol for  
different characters it is not a problem with python, but with the  
font. Then there is the different chars in unicode that are really  
suposed to be the same, then you need to know the context of the  
expression to know their meaning and then again this is not a python  
problem, maybe a unicode problem, I like to think this is a cultural  
problem, and we have to learn to live with it.

> so that Python can remain a language that one *can*
> fully understand.

I know I'm being picky, but rethink for a little about this, probably  
you are afraid of this change, but really there is nothing to be  
afraid of. If some code is written in some language you don't  
understand or in an encoding that your editor don't know how to  
handle you will not be able to edit it. But then again, this is  
probably already true with the # _*_ encoding: parameter and with  
lots of crappy editors that don't even know how to handle utf-8.

--
Leonardo Santagada
santagada at gmail.com





More information about the Python-3000 mailing list