4 ms·
It's true that programmers don't understand Python3 strings. But the language is to blame for being opaque. Go is right up front: Go strings use UTF-8 and Go s
by paulsutter 10y ago
It's true that programmers don't understand Python3 strings. But the language is to blame for being opaque.
Go is right up front: Go strings use UTF-8 and Go source code is in UTF-8. You can get the length of a string in bytes, or in runes. There's only one string type. Since every programmer needs to understand UTF-8 anyway, you can understand it immediately.
I tried to find how Python3 unicode strings work, but I could not find it anywhere, until I saw nneonneo's comment here.