4 ms·
How about: >>> 'abc' + 'def'[1] abce >>> b'abc' + 'def'[1] TypeError: can't concat int to bytes It's been responsible for a lot of bugs in my
by rstuart4133 3y ago
How about:
>>> 'abc' + 'def'[1]
abce
>>> b'abc' + 'def'[1]
TypeError: can't concat int to bytes
It's been responsible for a lot of bugs in my code. They copied the "bytes is an array of integers" thing from Java. Big mistake. Python is not Java.
Them treating filenames as strings is another bug factory on Linux. Almost no one unit tests filenames with invalid encodings, so the result is a whole pile of python3 programs will fall when given perfectly valid input, whereas those same programs in python2 were fine.
It's a very odd outcome given python harks from Linux.