![]() I know ASCII by heart, but I can't memorize Unicode. ![]() I know it shouldn't happen, but it will happen, and ASCII mostly works around that problem.Īnother issue is readability. Code needs to work across machines and platforms, and it's basically guaranteed that someone, somewhere is going to screw up the encoding. It's a simple matter of reducing the surface area of possible problems. I live in Europe and I (mostly) agree that (most) code shouldn't (usually) contain any codepoint greater than 127. > As somebody living in Europe, I think it's a perspective you can have only if you live mostly in an English speaking world. Got garbage bytes in string object ? Silently concatenate with a valid string and produce garbage. Reading bytes from an image file ? Get back a string object. Using raw_input() with unicode to ask a question? Crashes. The student write their name in a comment ? Crashes if you forget the encoding header. In fact, just teaching Python 2 is painful in Europe. Yes, you can, just like you can code memory safe code in C. It's even worse because most software is produced by English speaking people that have your attitude, and are completely oblivious about the crashing bugs they introduce on a daily basis.Īnd I've heard the people saying you can perfectly code unicode aware software in Python 2. Reading from my "Vidéos" directory, entering my first name, dealing with the "février" month in date parsing.įor the USA, things just work most of the time. Up to 2015, my laptop was plagued with Python software (and others) crashing because they didn't handle unicode properly. As somebody living in Europe, I think it's a perspective you can have only if you live mostly in an English speaking world.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |