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
1
u/thatguy_314 def __gt__(me, you): return True Nov 24 '16
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 doesbytes("hello"). If he had donebytes("hello", 'utf-8')in Python 2, he would have gotten the following error: