|
|
|
|
|
by dotancohen
2089 days ago
|
|
For me the biggest issue was the reuse of datatype identifiers for different datatypes. Python 2 had a byte string <str> and a unicode string <unicode> types. Python 3 still has both types, but now the byte string type is called <bytes> and the unicode string type is called <str>. The new names are without a doubt better. In a vacuum. But coming from Python 2 to Python 3 and dealing heavily with encodings because I use Python for massaging machine-generated reports, the fact that they reused the same datatype identifier for bytes in P2 as for unicode in P3 really put me off. Now that I've made the change (OK, six years ago) I'm much happier with the way Python 3 handles bytes and unicode strings. I think it is a model that all languages could learn from. But it should have been called <string> or stayed <unicode> instead! |
|