3 ms·
Adoption is a real issue, but one that can be helped by actually using Python 3 (and encouraging others to use it), assuming you think the language is better. B
by andreareina 10y ago
Adoption is a real issue, but one that can be helped by actually using Python 3 (and encouraging others to use it), assuming you think the language is better. Big organizations have more clout here, for example Arch Linux uses Python 3 as the default Python interpreter.
The string/byte confusion is an issue for people who like to pretend that they're the same. They're not. A string can be represented by different byte streams depending on the encoding. That by itself tells you that they are not the same and should not be treated as the same thing. But we have many decades of conflating the two, and old habits die hard.
It's convenient to treat them as the same because IO deals with bytes and `write(some_string)` is easy. JavaScript's `"42" == 42` is just as easy, and just as wrong. The solution is both simple and easy: convert between strings and bytes at the IO interface. Explicit is better than implicit.