3 ms·
My personal thoughts on the matter aside, here is an informative post from Brett Cannon on why the Python 2/3 split happened: https://snarky.ca/why-python-3-ex
by Qub3d 7y ago
My personal thoughts on the matter aside, here is an informative post from Brett Cannon on why the Python 2/3 split happened:
https://snarky.ca/why-python-3-exists/ https://snarky.ca/why-python-3-exists/
- loeg 7y agoThat's what happened to fork the language, but really glosses on the "why." Paraphrased: "People were too lazy about using the unicode type and bytes type, so we forced all string constants to be unicode." I think there is some cognitive dissonance between thinking this fixes lazy programmers and expecting codebases to be rewritten in the new language. (I.e., by who? Those same programmers too lazy to use the unicode type?) Also, all the world wasn't unicode at the time and still isn't (unfortunately, IMO, but still the case). We still have customers using various non-Unicode encodings and not all characters have a 1:1 encoding/decoding round-trip through Unicode.
- pseudalopex 7y agoThe article does say people get lazy or performance hungry but the theme of that section is people making mistakes. The part about Unicode is about how much Python 2 code accidentally only handled ASCII. Python 2 requires handling other encodings as bytes anyway.
- takeda 7y ago> That's what happened to fork the language, but really glosses on the "why." Paraphrased: "People were too lazy about using the unicode type and bytes type, so we forced all string constants to be unicode." I strongly disagree. I actually tried using unicode correctly in python 2, it is actually quite hard. It's similar to using memory safely in C, it is possible, but there are many gotchas. In python 3 all of this is done with no effort.