"More About Unicode in Python 2 and 3"

rdsteph at mac.com rdsteph at mac.com
Wed Jan 8 18:23:43 EST 2014


Chris A wrote:

I'm not sure that there is an "easy way". See, here's the deal. If all 
your data is ASCII, you can shut your eyes to the difference between 
bytes and text and Python 2 will work perfectly for you. Then some day 
you'll get a non-ASCII character come up (or maybe you'll get all of 
Latin-1 "for free" and it's when you get a non-Latin-1 character - 
same difference), and you start throwing in encode() and decode() 
calls in places. But you feel like you're fixing little problems with 
little solutions, so it's no big deal. 

Making the switch to Python 3 forces you to distinguish bytes from 
text, even when that text is all ASCII. Suddenly that's a huge job, a 
huge change through all your code, and it's all because of this switch 
to Python 3. The fact that you then get the entire Unicode range "for 
free" doesn't comfort people who are dealing with URLs and are 


I think this is important because this kind of programming, working with urls is so common and so important. whEther anyone like's it or not,
python 3 makes itch harder to do this very crucial kind of programming. And dismissing-Armin's frustrations and commetncnames dozens make this problem go away. 



More information about the Python-list mailing list