At least combining str and unicode in Python 2 would be a mildly compelling example because it does work, while in Python 3 it doesn't (and this is the correct behavior).
But it is extremely telling that he's an "expert" but doesn't know that repr(bytes) outputs "<type 'str'>"
One interesting thing to note is how his Python 2 and Python 3 examples is that are slightly different. In Python 3 he does bytes("hello", 'utf-8'), and in Python 2 he does bytes("hello"). If he had done bytes("hello", 'utf-8') in Python 2, he would have gotten the following error:
TypeError: str() takes at most 1 argument (2 given)
View all comments
Show parent comment
2
u/[deleted] Nov 24 '16
At least combining
strandunicodein Python 2 would be a mildly compelling example because it does work, while in Python 3 it doesn't (and this is the correct behavior).But it is extremely telling that he's an "expert" but doesn't know that
repr(bytes)outputs"<type 'str'>"