4 ms·
It would still be a mess any time you have to deal with byte strings that aren't UTF-8. The problem is with the implicit conversion itself - it shouldn't happen
by int_19h 7y ago
It would still be a mess any time you have to deal with byte strings that aren't UTF-8. The problem is with the implicit conversion itself - it shouldn't happen, because there's no way to properly guess the encoding. But there was no way to get rid of it without breaking things.
- otabdeveloper4 7y ago> But there was no way to get rid of it without breaking things. Even such a breaking change would be a molehill compared to the mountain of breaking changes in Python 3. Point is, they had one job, and they failed.
- int_19h 7y agoThat change was at the heart of the breaking changes around strings in Python 3. If the conversions remained implicit, most people would probably have never even noticed that string literals default to Unicode, or that some library functions now require Unicode strings.