3 ms·
Okay, another flamebait article. I'll byte, uh no, bite. > Inconsistencies in Types There's just no such thing as a builtin character type in Python. No, that
by oefrha 7y ago
Okay, another flamebait article. I'll byte, uh no, bite.
> Inconsistencies in Types
There's just no such thing as a builtin character type in Python. No, that's not new to Python 3. '/' is a str. b'/' is a bytes. Indexing str gives you a str because there's no such thing as a character type, and introducing it would be pointless. Indexing bytes gives you a byte (an int) instead of a bytes because if you're working with a raw byte sequence you probably want to access the bytes individually? If this wasn't the case people working with raw byte sequences would probably be even more displeased during the transition period.
"But I can't port the code by prepending b to every string literal!" Sorry, that's not the correct way to port.
> Bugs in the standard library
Yeah, that might be Unicode-related bugs in PSL. They were users' problems in Python 2 era, now Python core team shoulders the burden. Instead of every single programmer making Unicode errors in their own code, if you find an error in PSL you can fix it once and for all.