4 ms·
Python 3 doesn't remove unicode issues, although granted you probably run into fewer issues when defaulting to unicode over a bytestring.
by 2T1Qka0rEiPr 10y ago
Python 3 doesn't remove unicode issues, although granted you probably run into fewer issues when defaulting to unicode over a bytestring.
- vuanotino 10y agoIt doesn't? I've ran into UnicodeDecodeError exceptions literally every time I've had to deal with external input in Python 2. It was a nightmare, and it made me hate Python. With Python 3, that simply has never happened to me. Never. I don't know why. I don't know what the change, what the secret sauce was. And what's even better: I don't have to care. Python now simply works for me. So yes, Python did remove Unicode issues.
- doppel 10y agoBecause unicode is default and the byte-type is single-byte adressable (rather than 1 character in <encoding>) it makes it more straightforward. It's not perfect, but it helps a lot.
- sevensor 10y agoPython 3 doesn't remove all unicode issues, it's not magic. But the pain is 95% gone compared with Python 2. I write Python for a living, and my life has been a lot better since we switched.