4 ms·
> I feel like a lot of the people who had this reaction were reacting to being told (correctly) that how they handled strings was broken Can you be very precis
by someguydave 4y ago
> I feel like a lot of the people who had this reaction were reacting to being told (correctly) that how they handled strings was broken
Can you be very precise about what you mean by "broken" or "incorrect" code?
- Doxin 4y agoIn python2 you can easily mix encoded and unencoded strings. This doesn't actually work, but at worst it'll produce mangled strings. You used to see this sort of thing online quite a lot with webpages having all sorts of weird characters and question marks showing up. Python3 enforces the difference between encoded and unencoded strings. It forces you to deal correctly with unicode. If your code base was already handling unicode correctly it wasn't much hassle to migrate. If your code base was making a mess of unicode handling --like many at the time were-- you'd run into that headfirst.
- someguydave 4y agoThere are many codebases in the world that never need to deal with Unicode. Therefore, new language features which deal with Unicode are unwelcome when they replace the existing string API (which was often used to handle raw bytes)