lunes, septiembre 14, 2015

tl;dr: Python 2 vs Python 3

$ cat main.py
print (u"Hello " + b"World!");

$ python2 main.py
Hello World!

$ python3 main.py
Traceback (most recent call ast):
  File "main.py", line 1, in <module>
    print (u"Hello " + b"World!");
TypeError: Can't convert 'bytes' object to str implicitly